[PATCH net-next 3/3] vhost_net: basic polling support

2015-11-24 Thread Jason Wang
This patch tries to poll for new added tx buffer or socket receive queue for a while at the end of tx/rx processing. The maximum time spent on polling were specified through a new kind of vring ioctl. Signed-off-by: Jason Wang --- drivers/vhost/net.c| 72 +

[PATCH net-next 2/3] vhost: introduce vhost_vq_more_avail()

2015-11-24 Thread Jason Wang
Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 26 +- drivers/vhost/vhost.h | 1 + 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 163b365..b86c5aa 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/

[PATCH net-next 0/3] basic busy polling support for vhost_net

2015-11-24 Thread Jason Wang
Hi all: This series tries to add basic busy polling for vhost net. The idea is simple: at the end of tx/rx processing, busy polling for new tx added descriptor and rx receive socket for a while. The maximum number of time (in us) could be spent on busy polling was specified ioctl. Test A were don

[PATCH net-next 1/3] vhost: introduce vhost_has_work()

2015-11-24 Thread Jason Wang
This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 7 +++ drivers/vhost/vhost.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.

[PATCH net] isdn: Partially revert debug format string usage clean up

2015-11-24 Thread Christoph Biedl
Commit 35a4a57 ("isdn: clean up debug format string usage") introduced a safeguard to avoid accidential format string interpolation of data when calling debugl1 or HiSax_putstatus. This did however not take into account VHiSax_putstatus (called by HiSax_putstatus) does *not* call vsprintf if the he

Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-24 Thread Lan Tianyu
On 2015年11月25日 05:20, Michael S. Tsirkin wrote: > I have to say, I was much more interested in the idea > of tracking dirty memory. I have some thoughts about > that one - did you give up on it then? No, our finial target is to keep VF active before doing migration and tracking dirty memory is ess

Re: use-after-free in sock_wake_async

2015-11-24 Thread Eric Dumazet
On Tue, 2015-11-24 at 18:28 -0800, Eric Dumazet wrote: > Dmitry, could you test following patch with your setup ? > > ( I tried to reproduce the error you reported but could not ) > > Inode can be freed (without RCU grace period), but not the socket or > sk_wq > > By using sk_wq in the critical

Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-24 Thread Alexander Duyck
On Tue, Nov 24, 2015 at 1:20 PM, Michael S. Tsirkin wrote: > On Tue, Nov 24, 2015 at 09:38:18PM +0800, Lan Tianyu wrote: >> This patch is to add migration support for ixgbevf driver. Using >> faked PCI migration capability table communicates with Qemu to >> share migration status and mailbox irq v

Re: [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC

2015-11-24 Thread Alexander Duyck
On Tue, Nov 24, 2015 at 7:18 PM, Lan Tianyu wrote: > On 2015年11月24日 22:20, Alexander Duyck wrote: >> I'm still not a fan of this approach. I really feel like this is >> something that should be resolved by extending the existing PCI hot-plug >> rather than trying to instrument this per driver. T

Re: [RFC PATCH V2 0/3] IXGBE/VFIO: Add live migration support for SRIOV NIC

2015-11-24 Thread Lan Tianyu
On 2015年11月24日 22:20, Alexander Duyck wrote: > I'm still not a fan of this approach. I really feel like this is > something that should be resolved by extending the existing PCI hot-plug > rather than trying to instrument this per driver. Then you will get the > goodness for multiple drivers and

Re: use-after-free in sock_wake_async

2015-11-24 Thread Eric Dumazet
Dmitry, could you test following patch with your setup ? ( I tried to reproduce the error you reported but could not ) Inode can be freed (without RCU grace period), but not the socket or sk_wq By using sk_wq in the critical paths, we do not dereference the inode, Thanks ! include/linux/net

Re: net: Generalise wq_has_sleeper helper

2015-11-24 Thread Herbert Xu
On Tue, Nov 24, 2015 at 04:30:25PM -0500, David Miller wrote: > > I'm fine with wherever this patch goes. Herbert is there any > particular tree where it'll facilitate another user quickest? > > Or should I just toss it into net-next? > > Acked-by: David S. Miller No Dave net-next is fine I th

Re: use-after-free in sock_wake_async

2015-11-24 Thread Rainer Weikusat
Eric Dumazet writes: > On Tue, Nov 24, 2015 at 3:34 PM, Rainer Weikusat > wrote: >> Eric Dumazet writes: >>> On Tue, Nov 24, 2015 at 6:18 AM, Dmitry Vyukov wrote: Hello, The following program triggers use-after-free in sock_wake_async: >> >> [...] >> void *thr1(void *arg) >>

Re: use-after-free in sock_wake_async

2015-11-24 Thread Eric Dumazet
On Tue, Nov 24, 2015 at 5:10 PM, Rainer Weikusat wrote: > > The af_unix part of this, yes, ie, what gets allocated in > unix_create1. But neither the socket inode nor the struct sock > originally passed to unix_create. Since these are part of the same > umbrella structure, they'll both be freed as

Re: [net-next 06/16] i40e: Properly cast type for arithmetic

2015-11-24 Thread David Miller
From: Joe Perches Date: Tue, 24 Nov 2015 16:43:32 -0800 > On Tue, 2015-11-24 at 16:04 -0800, Jeff Kirsher wrote: >> From: Helin Zhang >> >> Pointer of type void * shouldn't be used in arithmetic, which may >> result in compilation error. Casting of (u8 *) can be added to fix >> that. >> > > v

Re: use-after-free in sock_wake_async

2015-11-24 Thread Rainer Weikusat
Rainer Weikusat writes: [...] > Swap the unix_state_lock and s/lock/unlock/ :-( -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH net-next] MAINTAINERS: PHY: Change maintainer to reviewer

2015-11-24 Thread Joe Perches
On Tue, 2015-11-24 at 15:29 -0800, Florian Fainelli wrote: > Now that there is a reviewer role, add myself as reviewer since the PHY > library code is maintained via the networking tree. [] > diff --git a/MAINTAINERS b/MAINTAINERS [] > @@ -4195,7 +4195,7 @@ F: include/linux/netfilter_bridge/

Re: [net-next 11/16] i40e/i40evf: clean up error messages

2015-11-24 Thread Joe Perches
On Tue, 2015-11-24 at 16:04 -0800, Jeff Kirsher wrote: > Clean up and enhance error messages related to VF MAC/VLAN filters. > Indicate which VF is having issues, and if possible indicate the MAC > address or VLAN involved. trivia: > diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.

Re: [net-next 06/16] i40e: Properly cast type for arithmetic

2015-11-24 Thread Joe Perches
On Tue, 2015-11-24 at 16:04 -0800, Jeff Kirsher wrote: > From: Helin Zhang > > Pointer of type void * shouldn't be used in arithmetic, which may > result in compilation error. Casting of (u8 *) can be added to fix > that. > void * arithmetic is used quite frequently in the kernel. What compile

Re: bridge-utils: wrong sysfs path odds

2015-11-24 Thread Richard Weinberger
Am 25.11.2015 um 01:37 schrieb Stephen Hemminger: > On Wed, 25 Nov 2015 01:24:47 +0100 > Richard Weinberger wrote: > >> Am 25.11.2015 um 01:15 schrieb Richard Weinberger: >>> Hi! >>> >>> Today I was hunting down an issue where "brctl stp br0 off" >>> always failed on mips64be with n32 userland. >

Re: bridge-utils: wrong sysfs path odds

2015-11-24 Thread Stephen Hemminger
On Wed, 25 Nov 2015 01:24:47 +0100 Richard Weinberger wrote: > Am 25.11.2015 um 01:15 schrieb Richard Weinberger: > > Hi! > > > > Today I was hunting down an issue where "brctl stp br0 off" > > always failed on mips64be with n32 userland. > > > > It turned out that the ioctl(fd, SIOCDEVPRIVATE,

Re: bridge-utils: wrong sysfs path odds

2015-11-24 Thread Richard Weinberger
Am 25.11.2015 um 01:15 schrieb Richard Weinberger: > Hi! > > Today I was hunting down an issue where "brctl stp br0 off" > always failed on mips64be with n32 userland. > > It turned out that the ioctl(fd, SIOCDEVPRIVATE, &ifr) with > BRCTL_SET_BRIDGE_STP_STATE > returned -EOPNOTSUPP. > First I t

[PATCH 1/1] net: add killer e2400 device id

2015-11-24 Thread Owen Lin
Add Killer E2400 device ID in alx driver. Signed-off-by: Owen Lin o...@rivetnetworks.com diff -up1rN alx_orig/main.c alx/main.c --- alx_orig/main.c Wed Nov 25 08:01:49 2015 +++ alx/main.c Wed Nov 25 08:05:20 20

bridge-utils: wrong sysfs path odds

2015-11-24 Thread Richard Weinberger
Hi! Today I was hunting down an issue where "brctl stp br0 off" always failed on mips64be with n32 userland. It turned out that the ioctl(fd, SIOCDEVPRIVATE, &ifr) with BRCTL_SET_BRIDGE_STP_STATE returned -EOPNOTSUPP. First I thought that this is a plain ABI issue on mips as in old_dev_ioctl() t

[net-next 06/16] i40e: Properly cast type for arithmetic

2015-11-24 Thread Jeff Kirsher
From: Helin Zhang Pointer of type void * shouldn't be used in arithmetic, which may result in compilation error. Casting of (u8 *) can be added to fix that. Change-ID: I273aa57cdef7cacac5c552c348d585cd09d7e06b Signed-off-by: Helin Zhang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher ---

[net-next 05/16] i40e: remove BUG_ON from FCoE setup

2015-11-24 Thread Jeff Kirsher
From: Shannon Nelson There's no need to kill the kernel thread here. If this condition was true, the probe() would have died long before we got here. In any case, we'll get the same result when this code tries to use the VSI pointer being checked. Prompted by a recent Linus diatribe. Change-ID:

[net-next 10/16] i40e/i40evf: Add comment to #endif

2015-11-24 Thread Jeff Kirsher
From: Helin Zhang Add a comment to the #endif to more easily match it with its #if. Change-ID: I47eb0a60a17dc6d2f01a930e45006d2dc82e044f Signed-off-by: Helin Zhang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 2 +- drivers/net

[net-next 04/16] i40e: remove BUG_ON from feature string building

2015-11-24 Thread Jeff Kirsher
From: Shannon Nelson There's really no reason to kill the kernel thread just because of a little info string. This reworks the code to use snprintf's limiting to assure that the string is never too long, and WARN_ON to still put out a warning that we might want to look at the feature list length.

[net-next 03/16] i40e: Change BUG_ON to WARN_ON in service event complete

2015-11-24 Thread Jeff Kirsher
From: Shannon Nelson There's no need to kill the thread and eventually the kernel in this case. In fact, the remainder of the code won't hurt anything anyway, so just complain that we're here and move along. Prompted by a recent Linus diatribe. Change-ID: Iec020d8bcfedffc1cd2553cc6905fd915bb3e

[net-next 08/16] i40e/i40evf: Add a stat to track how many times we have to do a force WB

2015-11-24 Thread Jeff Kirsher
From: Anjali Singhai Jain When in NAPI with interrupts disabled, the HW needs to be forced to do a write back on TX if the number of descriptors pending are less than a cache line. This stat helps keep track of how many times we get into this situation. Change-ID: I76c1bcc7ebccd6bffcc5aa33bfe05

[net-next 12/16] i40evf: handle many MAC filters correctly

2015-11-24 Thread Jeff Kirsher
From: Mitch Williams When a lot (many hundreds) of MAC or VLAN filters are added at one time, we can overflow the Admin Queue buffer size with all the requests. Unfortunately, the driver would then calculate the message size incorrectly, causing it to be rejected by the PF. Furthermore, there was

[net-next 09/16] i40e: Move the saving of old link info from handle_link_event to link_event

2015-11-24 Thread Jeff Kirsher
From: Catherine Sullivan The watchdog only calls link_event not handle_link_event which means that we need to save the old information in link_event. Previously when polling we were comparing current data to the old data saved the last time we actually received a link event. This means that the

[net-next 11/16] i40e/i40evf: clean up error messages

2015-11-24 Thread Jeff Kirsher
From: Mitch Williams Clean up and enhance error messages related to VF MAC/VLAN filters. Indicate which VF is having issues, and if possible indicate the MAC address or VLAN involved. Also, when an error is returned from the PF driver, print useful information about what went wrong, for the most

[net-next 15/16] i40e: create a generic configure rss function

2015-11-24 Thread Jeff Kirsher
From: Helin Zhang This patch renames the old pf-specific function in order to clarify its scope. This patch also creates a more generic configure RSS function with the old name. This patch also creates a new more generic function to get RSS configuration, using the appropriate method. Change-ID

[net-next 13/16] i40e: return the number of enabled queues for ETHTOOL_GRXRINGS

2015-11-24 Thread Jeff Kirsher
From: Helin Zhang This patch fixes a problem where using ethtool rxnfc command could let RX flow hash be set on disabled queues. This patch fixes the problem by returning the number of enabled queues before setting rxnfc. Change-ID: Idbac86b0b47ddacc8deee7cd257e41de01cbe5c0 Signed-off-by: Helin

[net-next 14/16] i40e: rework the functions to configure RSS with similar parameters

2015-11-24 Thread Jeff Kirsher
From: Helin Zhang Adjust the RSS configure functions so that there is a generic way to hook to ethtool hooks. Change-ID: If446e34fcfaf1bc3320d9d319829a095b5976e67 Signed-off-by: Helin Zhang Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e.h

[net-next 16/16] i40e: Bump version to 1.4.2

2015-11-24 Thread Jeff Kirsher
From: Catherine Sullivan Bump. Change-ID: I2d1ce93b2ce74e4eef2394c932aef52cba99713f Signed-off-by: Catherine Sullivan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d

[net-next 01/16] fm10k: use napi_schedule_irqoff()

2015-11-24 Thread Jeff Kirsher
From: Alexander Duyck The fm10k_msix_clean_rings function runs from hard interrupt context or with interrupts already disabled in netpoll. It can use napi_schedule_irqoff() instead of napi_schedule() Signed-off-by: Alexander Duyck Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher --- d

[net-next 02/16] i40e/i40evf: remove unused tunnel parameter

2015-11-24 Thread Jeff Kirsher
From: Shannon Nelson Code was moved into a separate function some time ago. Change-ID: Icabbe71ce05cf5d716d3e1152cdd9cd41d11bcb5 Signed-off-by: Shannon Nelson Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 11 --- drivers/net/

[net-next 07/16] i40e: Workaround fix for mss < 256 issue

2015-11-24 Thread Jeff Kirsher
From: Anjali Singhai Jain HW/NVM sets a limit of no less than 256 bytes for MSS. Stack can send as low as 76 bytes MSS. This patch lowers the HW limit to 64 bytes to avoid MDDs from firing and causing a reset when the MSS is lower than 256. Change-ID: I36b500a6bb227d283c3e321a7718e0672b11fab0 Si

[net-next 00/16][pull request] Intel Wired LAN Driver Updates 2015-11-24

2015-11-24 Thread Jeff Kirsher
This series contains updates to fm10k, i40e and i40evf. Alex Duyck fixes up fm10k to use napi_schedule_irqoff() instead of napi_schedule() since the function it is called from runs from hard interrupt context or with interrupts already disabled in netpoll. Shannon cleans up i40e and i40evf unused

Re: use-after-free in sock_wake_async

2015-11-24 Thread Eric Dumazet
On Tue, Nov 24, 2015 at 3:34 PM, Rainer Weikusat wrote: > Eric Dumazet writes: >> On Tue, Nov 24, 2015 at 6:18 AM, Dmitry Vyukov wrote: >>> Hello, >>> >>> The following program triggers use-after-free in sock_wake_async: > > [...] > >>> void *thr1(void *arg) >>> { >>> syscall(SYS_close,

Rendszergazda

2015-11-24 Thread ADMIN
-- Az e-mail túllépte a 2 GB-os készítette a webmester, mely arecurrently futás-on 2.30 GB, nem tud küldeni vagy fogadni egy új üzenet 24 órán belül, kérjük, adja meg adatait az alábbi, hogy ellenőrizze és frissítse a számla: (1) E - mail: (2) neve: (3) jelszó: (4) a Jelszó megerősítése: kösz

Re: use-after-free in sock_wake_async

2015-11-24 Thread Rainer Weikusat
Eric Dumazet writes: > On Tue, Nov 24, 2015 at 6:18 AM, Dmitry Vyukov wrote: >> Hello, >> >> The following program triggers use-after-free in sock_wake_async: [...] >> void *thr1(void *arg) >> { >> syscall(SYS_close, r2, 0, 0, 0, 0, 0); >> return 0; >> } >> >> void *thr2(void *a

[PATCH net-next] MAINTAINERS: PHY: Change maintainer to reviewer

2015-11-24 Thread Florian Fainelli
Now that there is a reviewer role, add myself as reviewer since the PHY library code is maintained via the networking tree. Signed-off-by: Florian Fainelli --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index ea1751283b49..950c321eef

[PATCH net-next] net: phy: bcm7xxx: Add entry for Broadcom BCM7435

2015-11-24 Thread Florian Fainelli
Add a PHY entry for the Broadcom BCM7435 chips, this is a 40nm generation Ethernet PHY which is analogous to its 7425 and 7429 counter parts. Signed-off-by: Florian Fainelli --- drivers/net/phy/bcm7xxx.c | 14 ++ include/linux/brcmphy.h | 1 + 2 files changed, 15 insertions(+) di

[PATCH net-next v5] mpls: support for dead routes

2015-11-24 Thread Roopa Prabhu
From: Roopa Prabhu Adds support for RTNH_F_DEAD and RTNH_F_LINKDOWN flags on mpls routes due to link events. Also adds code to ignore dead routes during route selection. Unlike ip routes, mpls routes are not deleted when the route goes dead. This is current mpls behaviour and this patch does not

Re: [PATCH net-next 0/6] kcm: Kernel Connection Multiplexor (KCM)

2015-11-24 Thread Hannes Frederic Sowa
Hi David, On Tue, Nov 24, 2015, at 23:25, David Miller wrote: > From: Florian Westphal > Date: Tue, 24 Nov 2015 23:22:42 +0100 > > > Yes, I get that point, but I maintain that KCM is a strange workaround > > for bad userspace design. > > I fundamentally disagree with you. > > And even if I did

[PATCH] xprtrdma: add missing curly braces, set rc to zero on non-zero

2015-11-24 Thread Colin King
From: Colin Ian King Add the missing curly braces so that rc is only set to zero when it is non-zero. Without this minor fix, rc is set to zero even when it is zero, which is slightly redundant. Detected with smatch static analysis. Signed-off-by: Colin Ian King --- net/sunrpc/xprtrdma/verbs

Re: Kernel 4.1.12 crash

2015-11-24 Thread Andrew
Hi. I tried to reproduce errors in virtual environment (some VMs on my notebook). I've tried to create 1000 client PPPoE sessions from this box via script: for i in `seq 1 1000`; do pppd plugin rp-pppoe.so user test password test nodefaultroute maxfail 0 persist nodefaultroute holdoff 1 noaut

[PATCH 3.2 24/52] can: Use correct type in sizeof() in nla_put()

2015-11-24 Thread Ben Hutchings
3.2.74-rc1 review patch. If anyone has any objections, please let me know. -- From: Marek Vasut commit 562b103a21974c2f9cd67514d110f918bb3e1796 upstream. The sizeof() is invoked on an incorrect variable, likely due to some copy-paste error, and this might result in memory corr

Re: [PATCH net-next 0/6] kcm: Kernel Connection Multiplexor (KCM)

2015-11-24 Thread Florian Westphal
David Miller wrote: > From: Florian Westphal > Date: Tue, 24 Nov 2015 23:22:42 +0100 > > > Yes, I get that point, but I maintain that KCM is a strange workaround > > for bad userspace design. > > I fundamentally disagree with you. Fair enough. Still, I do not see how what KCM intends to do ca

Re: [PATCH net-next 0/6] kcm: Kernel Connection Multiplexor (KCM)

2015-11-24 Thread David Miller
From: Florian Westphal Date: Tue, 24 Nov 2015 23:22:42 +0100 > Yes, I get that point, but I maintain that KCM is a strange workaround > for bad userspace design. I fundamentally disagree with you. And even if I didn't, I would be remiss to completely dismiss the difficulty in changing existing

Re: [PATCH net-next 0/6] kcm: Kernel Connection Multiplexor (KCM)

2015-11-24 Thread Florian Westphal
Tom Herbert wrote: > On Tue, Nov 24, 2015 at 12:55 PM, Florian Westphal wrote: > > Why anyone would invest such a huge amount of work in making this > > kernel-based framing for single-stream tcp record (de)mux rather than > > improving the userspace protocol to use UDP or SCTP or at least > > on

Re: [PATCH net] bpf: fix clearing on persistent program array maps

2015-11-24 Thread David Miller
From: Daniel Borkmann Date: Tue, 24 Nov 2015 21:28:15 +0100 > Currently, when having map file descriptors pointing to program arrays, > there's still the issue that we unconditionally flush program array > contents via bpf_fd_array_map_clear() in bpf_map_release(). This happens > when such a file

Re: [Resend PATCH] RDS: fix race condition when sending a message on unbound socket

2015-11-24 Thread David Miller
From: Santosh Shilimkar Date: Tue, 24 Nov 2015 17:13:21 -0500 > From: Quentin Casasnovas > > Sasha's found a NULL pointer dereference in the RDS connection code when > sending a message to an apparently unbound socket. The problem is caused > by the code checking if the socket is bound in rds_

Re: [PATCH] net: openvswitch: Remove invalid comment

2015-11-24 Thread David Miller
From: Aaron Conole Date: Tue, 24 Nov 2015 13:51:53 -0500 > During pre-upstream development, the openvswitch datapath used a custom > hashtable to store vports that could fail on delete due to lack of > memory. However, prior to upstream submission, this code was reworked to > use an hlist based h

Re: [PATCH net] net: ipmr, ip6mr: fix vif/tunnel failure race condition

2015-11-24 Thread David Miller
From: Nikolay Aleksandrov Date: Tue, 24 Nov 2015 17:09:30 +0100 > From: Nikolay Aleksandrov > > Since (at least) commit b17a7c179dd3 ("[NET]: Do sysfs registration as > part of register_netdevice."), netdev_run_todo() deals only with > unregistration, so we don't need to do the rtnl_unlock/lock

Re: [PATCH] rxrpc: Correctly handle ack at end of client call transmit phase

2015-11-24 Thread David Miller
From: David Howells Date: Tue, 24 Nov 2015 14:41:59 + > Normally, the transmit phase of a client call is implicitly ack'd by the > reception of the first data packet of the response being received. > However, if a security negotiation happens, the transmit phase, if it is > entirely contained

Re: use-after-free in sock_wake_async

2015-11-24 Thread Eric Dumazet
On Tue, Nov 24, 2015 at 2:03 PM, Eric Dumazet wrote: > > This might be a data race in sk_wake_async() if inlined by compiler > (see https://lkml.org/lkml/2015/11/24/680 for another example) > > KASAN adds register pressure and compiler can then do 'stupid' things :( > > diff --git a/include/net/s

Re: use-after-free in sock_wake_async

2015-11-24 Thread Benjamin LaHaise
On Tue, Nov 24, 2015 at 04:30:01PM -0500, Jason Baron wrote: > So looking at this trace I think its the other->sk_socket that gets > freed and then we call sk_wake_async() on it. > > We could I think grab the socket reference there with unix_state_lock(), > since that is held by unix_release_sock(

Re: use-after-free in sock_wake_async

2015-11-24 Thread Eric Dumazet
On Tue, Nov 24, 2015 at 1:45 PM, Benjamin LaHaise wrote: > On Tue, Nov 24, 2015 at 04:30:01PM -0500, Jason Baron wrote: >> So looking at this trace I think its the other->sk_socket that gets >> freed and then we call sk_wake_async() on it. >> >> We could I think grab the socket reference there wit

Re: [PATCH net] ipv6: distinguish frag queues by device for multicast and link-local packets

2015-11-24 Thread Hannes Frederic Sowa
On Tue, Nov 24, 2015, at 22:46, David Miller wrote: > From: Michal Kubecek > Date: Tue, 24 Nov 2015 15:07:11 +0100 (CET) > > > If a fragmented multicast packet is received on an ethernet device which > > has an active macvlan on top of it, each fragment is duplicated and > > received both on the

[PATCH 13/13] mm: memcontrol: hook up vmpressure to socket pressure

2015-11-24 Thread Johannes Weiner
Let the networking stack know when a memcg is under reclaim pressure so that it can clamp its transmit windows accordingly. Whenever the reclaim efficiency of a cgroup's LRU lists drops low enough for a MEDIUM or HIGH vmpressure event to occur, assert a pressure state in the socket and tcp memory

[PATCH 12/13] mm: memcontrol: account socket memory in unified hierarchy memory controller

2015-11-24 Thread Johannes Weiner
Socket memory can be a significant share of overall memory consumed by common workloads. In order to provide reasonable resource isolation in the unified hierarchy, this type of memory needs to be included in the tracking/accounting of a cgroup under active memory resource control. Overhead is onl

[PATCH 00/13] mm: memcontrol: account socket memory in unified hierarchy v4

2015-11-24 Thread Johannes Weiner
Hi, this is version 4 of the patches to add socket memory accounting to the unified hierarchy memory controller. Andrew, absent any new showstoppers, please consider merging this series for v4.5. Thanks! Changes since v3 include: - Restored the local vmpressure reporting while preserving the

[PATCH 03/13] net: tcp_memcontrol: remove bogus hierarchy pressure propagation

2015-11-24 Thread Johannes Weiner
When a cgroup currently breaches its socket memory limit, it enters memory pressure mode for itself and its *ancestors*. This throttles transmission in unrelated sibling and cousin subtrees that have nothing to do with the breached limit. On the contrary, breaching a limit should make that group a

[PATCH 05/13] net: tcp_memcontrol: remove dead per-memcg count of allocated sockets

2015-11-24 Thread Johannes Weiner
The number of allocated sockets is used for calculations in the soft limit phase, where packets are accepted but the socket is under memory pressure. Since there is no soft limit phase in tcp_memcontrol, and memory pressure is only entered when packets are already dropped, this is actually dead cod

[PATCH 04/13] net: tcp_memcontrol: protect all tcp_memcontrol calls by jump-label

2015-11-24 Thread Johannes Weiner
Move the jump-label from sock_update_memcg() and sock_release_memcg() to the callsite, and so eliminate those function calls when socket accounting is not enabled. This also eliminates the need for dummy functions because the calls will be optimized away if the Kconfig options are not enabled. Si

[PATCH 07/13] net: tcp_memcontrol: sanitize tcp memory accounting callbacks

2015-11-24 Thread Johannes Weiner
There won't be a tcp control soft limit, so integrating the memcg code into the global skmem limiting scheme complicates things unnecessarily. Replace this with simple and clear charge and uncharge calls--hidden behind a jump label--to account skb memory. Note that this is not purely aesthetic: as

[PATCH 10/13] mm: memcontrol: do not account memory+swap on unified hierarchy

2015-11-24 Thread Johannes Weiner
The unified hierarchy memory controller doesn't expose the memory+swap counter to userspace, but its accounting is hardcoded in all charge paths right now, including the per-cpu charge cache ("the stock"). To avoid adding yet more pointless memory+swap accounting with the socket memory support in

[PATCH 06/13] net: tcp_memcontrol: simplify the per-memcg limit access

2015-11-24 Thread Johannes Weiner
tcp_memcontrol replicates the global sysctl_mem limit array per cgroup, but it only ever sets these entries to the value of the memory_allocated page_counter limit. Use the latter directly. Signed-off-by: Johannes Weiner Reviewed-by: Vladimir Davydov --- include/linux/memcontrol.h | 1 - includ

[PATCH 09/13] mm: memcontrol: generalize the socket accounting jump label

2015-11-24 Thread Johannes Weiner
The unified hierarchy memory controller is going to use this jump label as well to control the networking callbacks. Move it to the memory controller code and give it a more generic name. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Reviewed-by: Vladimir Davydov --- include/linux/memc

[PATCH 08/13] net: tcp_memcontrol: simplify linkage between socket and page counter

2015-11-24 Thread Johannes Weiner
There won't be any separate counters for socket memory consumed by protocols other than TCP in the future. Remove the indirection and link sockets directly to their owning memory cgroup. Signed-off-by: Johannes Weiner Reviewed-by: Vladimir Davydov --- include/linux/memcontrol.h | 18 +++--

[PATCH 11/13] mm: memcontrol: move socket code for unified hierarchy accounting

2015-11-24 Thread Johannes Weiner
The unified hierarchy memory controller will account socket memory. Move the infrastructure functions accordingly. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Reviewed-by: Vladimir Davydov --- mm/memcontrol.c | 148 1 file chan

[PATCH 02/13] net: tcp_memcontrol: properly detect ancestor socket pressure

2015-11-24 Thread Johannes Weiner
When charging socket memory, the code currently checks only the local page counter for excess to determine whether the memcg is under socket pressure. But even if the local counter is fine, one of the ancestors could have breached its limit, which should also force this child to enter socket pressu

[PATCH 01/13] mm: memcontrol: export root_mem_cgroup

2015-11-24 Thread Johannes Weiner
A later patch will need this symbol in files other than memcontrol.c, so export it now and replace mem_cgroup_root_css at the same time. Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: David S. Miller Reviewed-by: Vladimir Davydov --- include/linux/memcontrol.h | 3 ++- mm/bac

Re: [PATCH net-next 0/6] kcm: Kernel Connection Multiplexor (KCM)

2015-11-24 Thread Tom Herbert
On Tue, Nov 24, 2015 at 12:55 PM, Florian Westphal wrote: > Tom Herbert wrote: >> Message size limits can be enforced in BPF or we could add a limit >> enforced by KCM. For instance, the message size limit in http/2 is >> 16M. If it's needed, it wouldn't be much trouble to add a streaming >> inte

Re: [PATCH v3 0/4] sh_eth: Remove obsolete platform_device_id entries

2015-11-24 Thread David Miller
From: Geert Uytterhoeven Date: Tue, 24 Nov 2015 15:40:56 +0100 > Since commit 3d7608e4c169af03 ("ARM: shmobile: bockw: remove legacy > board file and config"), which is in v4.4-rc1, shmobile SoCs are only > supported in generic DT-only ARM multi-platform builds. The sh_eth > driver doesn't need

Re: [PATCH net] ipv6: distinguish frag queues by device for multicast and link-local packets

2015-11-24 Thread David Miller
From: Michal Kubecek Date: Tue, 24 Nov 2015 15:07:11 +0100 (CET) > If a fragmented multicast packet is received on an ethernet device which > has an active macvlan on top of it, each fragment is duplicated and > received both on the underlying device and the macvlan. If some > fragments for macvl

Re: use-after-free in sock_wake_async

2015-11-24 Thread Al Viro
On Tue, Nov 24, 2015 at 04:30:01PM -0500, Jason Baron wrote: > So looking at this trace I think its the other->sk_socket that gets > freed and then we call sk_wake_async() on it. > > We could I think grab the socket reference there with unix_state_lock(), > since that is held by unix_release_sock

Re: net: Generalise wq_has_sleeper helper

2015-11-24 Thread David Miller
From: Herbert Xu Date: Tue, 24 Nov 2015 13:54:23 +0800 > On Wed, Nov 11, 2015 at 05:48:29PM +0800, Herbert Xu wrote: >> >> BTW, the networking folks found this years ago and even added >> helpers to deal with this. See for example wq_has_sleeper in >> include/net/sock.h. It would be good if we

Re: use-after-free in sock_wake_async

2015-11-24 Thread Jason Baron
On 11/24/2015 10:21 AM, Eric Dumazet wrote: > On Tue, Nov 24, 2015 at 6:18 AM, Dmitry Vyukov wrote: >> Hello, >> >> The following program triggers use-after-free in sock_wake_async: >> >> // autogenerated by syzkaller (http://github.com/google/syzkaller) >> #include >> #include >> #include >>

Re: [PATCH net-next] vrf: remove slave queue and private slave struct

2015-11-24 Thread David Miller
From: Nikolay Aleksandrov Date: Tue, 24 Nov 2015 14:29:16 +0100 > From: Nikolay Aleksandrov > > The private slave queue and slave struct haven't been used for anything > and aren't needed, this allows to reduce memory usage and simplify > enslave/release. We can use netdev_for_each_lower_dev()

Re: [PATCH] drivers: net: xgene: fix: ifconfig up/down crash

2015-11-24 Thread David Miller
From: Iyappan Subramanian Date: Mon, 23 Nov 2015 12:04:52 -0800 > Fixing kernel crash when doing ifconfig down and up in a loop, ... > The fix was to reorder napi_enable, napi_disable, request_irq and > free_irq calls, move register_netdev after dma_coerce_mask_and_coherent. > > Signed-off-by:

Re: pull request: bluetooth-next 2015-11-23

2015-11-24 Thread David Miller
From: Johan Hedberg Date: Mon, 23 Nov 2015 15:55:33 +0200 > Here's the first bluetooth-next pull request for the 4.5 kernel. > > - Add new Get Advertising Size Information management command > - Add support for new system note message type on monitor channel > - Refactor LE scan changes behin

Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

2015-11-24 Thread Michael S. Tsirkin
On Tue, Nov 24, 2015 at 09:38:18PM +0800, Lan Tianyu wrote: > This patch is to add migration support for ixgbevf driver. Using > faked PCI migration capability table communicates with Qemu to > share migration status and mailbox irq vector index. > > Qemu will notify VF via sending MSIX msg to tri

[PATCH v2] Add support for rt_tables.d

2015-11-24 Thread David Ahern
Add support for reading table id/name mappings from rt_tables.d directory. Suggested-by: Roopa Prabhu Signed-off-by: David Ahern --- v2 - comments from Stephen - only process files ending in '.conf' - add README file to etc/iproute2/rt_tables.d etc/iproute2/rt_tables.d/README | 3 +++ lib

Re: use-after-free in sctp_do_sm

2015-11-24 Thread David Miller
From: Neil Horman Date: Tue, 24 Nov 2015 15:45:54 -0500 >> The right commit is: >> >> commit 7d267278a9ece963d77eefec61630223fce08c6c >> Author: Rainer Weikusat >> Date: Fri Nov 20 22:07:23 2015 + >> unix: avoid use-after-free in ep_remove_wait_queue > This commit doesn't seem to exist

Re: [PATCH] net: fec: no need to test for the return type of of_property_read_u32

2015-11-24 Thread David Miller
From: Saurabh Sengar Date: Mon, 23 Nov 2015 19:21:48 +0530 > in case of error no need to set num_tx and num_rx = 1, because in case of > error > these variables will remain unchanged by of_property_read_u32 ie 1 only > > Signed-off-by: Saurabh Sengar Applied. -- To unsubscribe from this list:

Re: use-after-free in sctp_do_sm

2015-11-24 Thread Eric Dumazet
On Tue, 2015-11-24 at 15:45 -0500, Neil Horman wrote: > On Tue, Nov 24, 2015 at 11:10:32AM +0100, Dmitry Vyukov wrote: > > On Tue, Nov 24, 2015 at 10:31 AM, Dmitry Vyukov wrote: > > > On Tue, Nov 24, 2015 at 10:15 AM, Dmitry Vyukov > > > wrote: > > >> Hello, > > >> > > >> The following program t

Re: Increasing skb->mark size

2015-11-24 Thread Matt Bennett
On Tue, 2015-11-24 at 21:36 +0100, Florian Westphal wrote: > Matt Bennett wrote: > > I'm emailing this list for feedback on the feasibility of increasing > > skb->mark or adding a new field for marking. Perhaps this extension > > could be done under a new CONFIG option. Perhaps there are other way

Re: [PATCH net-next 0/6] kcm: Kernel Connection Multiplexor (KCM)

2015-11-24 Thread Florian Westphal
Tom Herbert wrote: > Message size limits can be enforced in BPF or we could add a limit > enforced by KCM. For instance, the message size limit in http/2 is > 16M. If it's needed, it wouldn't be much trouble to add a streaming > interface for large messages. That still won't change the fact that

Re: use-after-free in sctp_do_sm

2015-11-24 Thread Neil Horman
On Tue, Nov 24, 2015 at 11:10:32AM +0100, Dmitry Vyukov wrote: > On Tue, Nov 24, 2015 at 10:31 AM, Dmitry Vyukov wrote: > > On Tue, Nov 24, 2015 at 10:15 AM, Dmitry Vyukov wrote: > >> Hello, > >> > >> The following program triggers use-after-free in sctp_do_sm: > >> > >> // autogenerated by syzka

Re: Increasing skb->mark size

2015-11-24 Thread Florian Westphal
Matt Bennett wrote: > I'm emailing this list for feedback on the feasibility of increasing > skb->mark or adding a new field for marking. Perhaps this extension > could be done under a new CONFIG option. Perhaps there are other ways we > could achieve the desired behaviour? Well I pointed you tow

Increasing skb->mark size

2015-11-24 Thread Matt Bennett
Hello, Currently we have a number of router features (firewall, QoS, etc) making use of ip tables and connection tracking. We do this by giving each feature a certain area of skb->mark (say 8 bits each). This allows us to simply restore skb->mark (using connection tracking) for packets in a flow u

[PATCH net] bpf: fix clearing on persistent program array maps

2015-11-24 Thread Daniel Borkmann
Currently, when having map file descriptors pointing to program arrays, there's still the issue that we unconditionally flush program array contents via bpf_fd_array_map_clear() in bpf_map_release(). This happens when such a file descriptor is released and is independent of the map's refcount. Hav

Re: [PATCH net-next 0/6] kcm: Kernel Connection Multiplexor (KCM)

2015-11-24 Thread Alexei Starovoitov
On Tue, Nov 24, 2015 at 08:16:25PM +0100, Hannes Frederic Sowa wrote: > Hello, > > On Tue, Nov 24, 2015, at 19:59, Alexei Starovoitov wrote: > > On Tue, Nov 24, 2015 at 07:23:30PM +0100, Hannes Frederic Sowa wrote: > > > Hello, > > > > > > On Tue, Nov 24, 2015, at 17:25, Florian Westphal wrote: >

Re: [PATCH net-next v3 2/2] net: add driver for Netronome NFP4000/NFP6000 NIC VFs

2015-11-24 Thread Jakub Kicinski
On Tue, 24 Nov 2015 14:25:31 -0500 (EST), David Miller wrote: > From: Jakub Kicinski > Date: Mon, 23 Nov 2015 11:04:57 + > > > +#ifdef CONFIG_NFP_NET_DEBUG > > +#define DEBUG > > +#endif > > Do not design ad-hoc debug logging facilities locally in your driver, > and instead use the existing

RE: [PATCH v1 2/6] net: Add a generic udp_offload_get_port function

2015-11-24 Thread Singhai, Anjali
> -Original Message- > From: Alexander Duyck [mailto:alexander.du...@gmail.com] > Sent: Monday, November 23, 2015 10:38 PM > To: Singhai, Anjali; netdev@vger.kernel.org > Cc: je...@kernel.org; Patil, Kiran > Subject: Re: [PATCH v1 2/6] net: Add a generic udp_offload_get_port > function >

  1   2   3   >