Re: net-scm: Macro for special pattern?

2015-11-17 Thread SF Markus Elfring
> You mean this likely() annotation of yours? How do you think about to express the software design pattern which is applied at the mentioned source code place by a dedicated preprocessor macro? Regards, Markus -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a

[PATCH] net: dns_resolver: convert time_t to time64_t

2015-11-17 Thread Aya Mahfouz
Changes the definition of the pointer _expiry from time_t to time64_t. This is to handle the Y2038 problem where time_t will overflow in the year 2038. The change is safe because the kernel subsystems that call dns_query pass NULL. Signed-off-by: Arnd Bergmann Signed-off-by: Aya Mahfouz --- Chan

Re: r8169 regression: UDP packets dropped intermittantly

2015-11-17 Thread Jonathan Woithe
On Wed, Nov 18, 2015 at 12:21:08AM +0100, Francois Romieu wrote: > Jonathan Woithe : > [...] > > It would be advantageous if we could upgrade this Linux system to a kernel > > more recent than 2.6.35.11, but that will require a resolution to this > > problem. Since 2.6.35.11 works while current k

Re: [PATCH 4/4] net: diag: Support destroying TCP sockets.

2015-11-17 Thread Lorenzo Colitti
On Wed, Nov 18, 2015 at 12:43 PM, kbuild test robot wrote: > All errors (new ones prefixed by >>): > >>> ERROR: "inet_diag_find_one_icsk" [net/ipv4/tcp_diag.ko] undefined! Oops. Missing export. Should be fixed in v2. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body

[PATCH v2 4/4] net: diag: Support destroying TCP sockets.

2015-11-17 Thread Lorenzo Colitti
This implements SOCK_DESTROY for TCP sockets. It causes all blocking calls on the socket to fail fast with ETIMEDOUT, which is the same thing that would eventually happen if the socket was left stuck on an IP address that the host no longer has. Signed-off-by: Lorenzo Colitti --- net/ipv4/tcp_di

[PATCH v2 2/4] net: diag: Add the ability to destroy a socket from userspace.

2015-11-17 Thread Lorenzo Colitti
This allows a privileged userspace process, such as a connection manager or system administration tool, to close sockets belonging to other apps when the network they were established on has disconnected. It is needed on laptops and mobile hosts to ensure that network switches / disconnects do not

[PATCH v2 3/4] net: diag: Support SOCK_DESTROY for inet sockets.

2015-11-17 Thread Lorenzo Colitti
This passes the SOCK_DESTROY operation to the underlying protocol diag handler, or returns -EINVAL if that handler does not define a destroy operation. Most of this patch is just renaming functions. This is not strictly necessary, but it would be fairly counterintuitive to have the code to destroy

[PATCH v2 1/4] net: diag: split inet_diag_dump_one_icsk into two

2015-11-17 Thread Lorenzo Colitti
Currently, inet_diag_dump_one_icsk finds a socket and then dumps its information to userspace. Split it into a part that finds the socket and a part that dumps the information. Signed-off-by: Lorenzo Colitti --- include/linux/inet_diag.h | 5 + net/ipv4/inet_diag.c | 42 +++

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-17 Thread Tom Herbert
On Tue, Nov 17, 2015 at 8:23 PM, Lorenzo Colitti wrote: > On Wed, Nov 18, 2015 at 12:56 PM, Tom Herbert wrote: >>> The patch series only implements SOCK_DESTROY for TCP sockets, >>> but the mechanism can be extended to any protocol family that >>> supports the sock_diag interface. >>> >> I assume

Re: [PATCH v2 1/4] net/core: revert "net: fix __netdev_update_features return.." and add comment

2015-11-17 Thread Lorenzo Colitti
On Wed, Nov 18, 2015 at 1:24 PM, Lorenzo Colitti wrote: > From: Nikolay Aleksandrov PEBKAC. Please ignore. -- 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 4/4] net: diag: Support destroying TCP sockets.

2015-11-17 Thread kbuild test robot
Hi Lorenzo, [auto build test ERROR on net/master] [also build test ERROR on v4.4-rc1 next-20151117] url: https://github.com/0day-ci/linux/commits/Lorenzo-Colitti/net-diag-split-inet_diag_dump_one_icsk-into-two/20151118-094638 config: i386-allmodconfig (attached as .config) reproduce

[PATCH v2 1/4] net/core: revert "net: fix __netdev_update_features return.." and add comment

2015-11-17 Thread Lorenzo Colitti
From: Nikolay Aleksandrov This reverts commit 00ee59271777 ("net: fix __netdev_update_features return on ndo_set_features failure") and adds a comment explaining why it's okay to return a value other than 0 upon error. Some drivers might actually change flags and return an error so it's better to

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-17 Thread Lorenzo Colitti
On Wed, Nov 18, 2015 at 12:56 PM, Tom Herbert wrote: >> The patch series only implements SOCK_DESTROY for TCP sockets, >> but the mechanism can be extended to any protocol family that >> supports the sock_diag interface. >> > I assume that SIOCKILLADDR was restricted to only closing connections >

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-17 Thread Eric Dumazet
On Tue, 2015-11-17 at 19:27 -0800, Stephen Hemminger wrote: > I understand why you might want this, but it smells like the same > kind of problems that the "forced unmount" patch had which eventually > led to it not being accepted in mainline. Lots of corner > cases and race conditions waiting to

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-17 Thread Maciej Żenczykowski
I don't know what the right fix is... However, speaking as an end user with laptops on wifi and/or home gateways on dialup connections where the IP address occasionally (or constantly) changes, I find it very frustrating that by default as IP addresses get removed from interfaces all the related s

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-17 Thread Tom Herbert
On Tue, Nov 17, 2015 at 5:43 PM, Lorenzo Colitti wrote: > This patch series adds the ability for a privileged process to > destroy sockets belonging to other userspace processes via the > sock_diag interface, and implements that for TCP sockets. > > This functionality is needed on laptops and mobi

[PATCH] net: macb: Add support for sgmii phy interface

2015-11-17 Thread Punnaiah Choudary Kalluri
This patch adds support for the sgmii phy interface. Signed-off-by: Punnaiah Choudary Kalluri --- drivers/net/ethernet/cadence/macb.c | 4 drivers/net/ethernet/cadence/macb.h | 5 + 2 files changed, 9 insertions(+) diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/etherne

Re: [PATCH 4/4] net: diag: Support destroying TCP sockets.

2015-11-17 Thread kbuild test robot
Hi Lorenzo, [auto build test ERROR on net/master] [also build test ERROR on v4.4-rc1 next-20151117] url: https://github.com/0day-ci/linux/commits/Lorenzo-Colitti/net-diag-split-inet_diag_dump_one_icsk-into-two/20151118-094638 config: x86_64-rhel (attached as .config) reproduce

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-17 Thread Erik Kline
On 18 November 2015 at 12:34, Erik Kline wrote: > > > On 18 November 2015 at 12:27, Stephen Hemminger > wrote: >> >> On Wed, 18 Nov 2015 10:43:40 +0900 >> Lorenzo Colitti wrote: >> >> > This patch series adds the ability for a privileged process to >> > destroy sockets belonging to other userspa

Re: Support SOCK_DESTROY in ss

2015-11-17 Thread Stephen Hemminger
On Wed, 18 Nov 2015 10:52:08 +0900 Lorenzo Colitti wrote: > This patch adds ss support for the SOCK_DESTROY operation just > submitted to net-next: http://patchwork.ozlabs.org/patch/545843/ . > It allows a user with CAP_NET_ADMIN to close sockets using > "ss --kill". > > -- > To unsubscribe from

Re: Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-17 Thread Stephen Hemminger
On Wed, 18 Nov 2015 10:43:40 +0900 Lorenzo Colitti wrote: > This patch series adds the ability for a privileged process to > destroy sockets belonging to other userspace processes via the > sock_diag interface, and implements that for TCP sockets. > > This functionality is needed on laptops and

Re: [ss PATCH 2/2] ss: support closing inet sockets via SOCK_DIAG.

2015-11-17 Thread Eric Dumazet
On Wed, 2015-11-18 at 10:52 +0900, Lorenzo Colitti wrote: > > +static int kill_inet_sock(const struct sockaddr_nl *addr, > + struct nlmsghdr *h, void *arg) > +{ > + struct rtnl_handle rth; > + if (rtnl_open_byproto(&rth, 0, NETLINK_SOCK_DIAG)) > + return -1; > + >

[PATCH v3 net-next] net: hisilicon: fix binding document of mdio

2015-11-17 Thread huangdaode
This patch explains the occasion of "hisilcon,mdio" and "hisilicon,hns-mdio" according to Arnd's comments. and reformat it according to comments from Rob. Signed-off-by: huangdaode --- change log: v3: 1)move change log under '---' line. 2)change minor syntax error on description. v2: 1) re

[ss PATCH 2/2] ss: support closing inet sockets via SOCK_DIAG.

2015-11-17 Thread Lorenzo Colitti
Invoking ss with -K or --kill attempts to forcibly close matching inet sockets using SOCK_DESTROY. This is implemented by adding a new "struct action" to struct filter. If necessary, this can be extended later on to support further actions on sockets. Signed-off-by: Lorenzo Colitti --- include/

Support SOCK_DESTROY in ss

2015-11-17 Thread Lorenzo Colitti
This patch adds ss support for the SOCK_DESTROY operation just submitted to net-next: http://patchwork.ozlabs.org/patch/545843/ . It allows a user with CAP_NET_ADMIN to close sockets using "ss --kill". -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to

[ss PATCH 1/2] libnetlink: ignore some errors from SOCK_DIAG_BY_FAMILY

2015-11-17 Thread Lorenzo Colitti
rtnl_dump ignors ENOENT or EOPNOTSUPP when attempting SOCK_DIAG_BY_FAMILY dumps. Do the same in rtnl_talk. Signed-off-by: Lorenzo Colitti --- include/libnetlink.h | 3 +++ lib/libnetlink.c | 5 + 2 files changed, 8 insertions(+) diff --git a/include/libnetlink.h b/include/libnetlink.h i

Add a SOCK_DESTROY operation to close sockets from userspace

2015-11-17 Thread Lorenzo Colitti
This patch series adds the ability for a privileged process to destroy sockets belonging to other userspace processes via the sock_diag interface, and implements that for TCP sockets. This functionality is needed on laptops and mobile hosts to ensure that network switches / disconnects do not resu

[PATCH 2/4] net: diag: Add the ability to destroy a socket from userspace.

2015-11-17 Thread Lorenzo Colitti
This allows a privileged userspace process, such as a connection manager or system administration tool, to close sockets belonging to other apps when the network they were established on has disconnected. It is needed on laptops and mobile hosts to ensure that network switches / disconnects do not

[PATCH 3/4] net: diag: Support SOCK_DESTROY for inet sockets.

2015-11-17 Thread Lorenzo Colitti
This passes the SOCK_DESTROY operation to the underlying protocol diag handler, or returns -EINVAL if that handler does not define a destroy operation. Most of this patch is just renaming functions. This is not strictly necessary, but it would be fairly counterintuitive to have the code to destroy

[PATCH 4/4] net: diag: Support destroying TCP sockets.

2015-11-17 Thread Lorenzo Colitti
This implements SOCK_DESTROY for TCP sockets. It causes all blocking calls on the socket to fail fast with ETIMEDOUT, which is the same thing that would eventually happen if the socket was left stuck on an IP address that the host no longer has. Change-Id: Icce9db8b832e84c9b6477e5a901c927b942f2bb9

Re: [PATCH v2 net-next] net: hisilicon: fix binding document of mdio

2015-11-17 Thread huangdaode
On 2015/11/16 23:20, Rob Herring wrote: On Mon, Nov 16, 2015 at 05:38:24PM +0800, huangdaode wrote: This patch explains the occasion of "hisilcon,mdio" and "hisilicon,hns-mdio" according to Arnd's comments. and reformat it according to comments from Rob. chang log: v2: 1) reformat the style

[PATCH 1/4] net: diag: split inet_diag_dump_one_icsk into two

2015-11-17 Thread Lorenzo Colitti
Currently, inet_diag_dump_one_icsk finds a socket and then dumps its information to userspace. Split it into a part that finds the socket and a part that dumps the information. Signed-off-by: Lorenzo Colitti --- include/linux/inet_diag.h | 5 + net/ipv4/inet_diag.c | 41 +++

Re: [PATCH v2 net-next] net: hisilicon: fix binding document of mdio

2015-11-17 Thread huangdaode
On 2015/11/16 17:38, Arnd Bergmann wrote: On Monday 16 November 2015 17:38:24 huangdaode wrote: This patch explains the occasion of "hisilcon,mdio" and "hisilicon,hns-mdio" according to Arnd's comments. and reformat it according to comments from Rob. chang log: v2: 1) reformat the style.

[PATCH] ethernet/atheros/alx: add Killer E2400 device ID

2015-11-17 Thread Jason Gerard DeRose
From: Ben Pope This patch adds the PCI device ID (0xe0a1) and alx_pci_tbl entry for the Killer E2400 Ethernet controller, modeled after the Killer E2200 controller support (0xe091) already present in the alx driver. This patch was originally authored by Ben Pope, but it got held up by issues in

Re: Hardware capabilities and bonding offload

2015-11-17 Thread John Fastabend
On 15-11-17 02:03 PM, Simon Horman wrote: > On Mon, Nov 16, 2015 at 08:10:27AM -0800, John Fastabend wrote: >> On 15-11-16 07:30 AM, Jiri Pirko wrote: >>> Mon, Nov 16, 2015 at 10:29:12AM CET, pjonn...@broadcom.com wrote: Hello, I am looking to offload bond interfaces to hardware for

Re: r8169 regression: UDP packets dropped intermittantly

2015-11-17 Thread Francois Romieu
Jonathan Woithe : [...] > It would be advantageous if we could upgrade this Linux system to a kernel > more recent than 2.6.35.11, but that will require a resolution to this > problem. Since 2.6.35.11 works while current kernels do not, the only other > option is to stick with 2.6.35.11. Is ther

Re: [PATCH net] net: fix feature changes on devices without ndo_set_features

2015-11-17 Thread Nikolay Aleksandrov
On 11/18/2015 12:03 AM, Sergei Shtylyov wrote: > Hello. > > On 11/13/2015 04:54 PM, Nikolay Aleksandrov wrote: > >> From: Nikolay Aleksandrov >> >> When __netdev_update_features() was updated to ensure some features are >> disabled on new lower devices, an error was introduced for devices which

Re: [PATCH iptables] libxt_cgroup2: add support for cgroup2 path matching

2015-11-17 Thread Tejun Heo
Hello, On Wed, Nov 18, 2015 at 12:02:01AM +0100, Jan Engelhardt wrote: > On Tuesday 2015-11-17 20:42, Tejun Heo wrote: > >+static void cgroup2_save(const void *ip, const struct xt_entry_match *match) > >+{ > >+const struct xt_cgroup2_info *info = (void *)match->data; > >+ > >+printf("%s --

RFC: right userspace interface for providing 6lowpan contexts

2015-11-17 Thread Alexander Aring
Hi, I recently sent some 6lowpan stateful compression patches to netdev. It provides to setup 6lowpan contexts entries (ipv6 prefixes and prefix-length by id) via debugfs manually at the moment. This means, it works when all other "network nodes" also sets the same ID's inside the table _manually

Re: [PATCH 1/5] cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it

2015-11-17 Thread Tejun Heo
On Tue, Nov 17, 2015 at 11:54:54PM +0100, Jan Engelhardt wrote: > > On Tuesday 2015-11-17 20:40, Tejun Heo wrote: > >+static inline bool cgroup_is_descendant(struct cgroup *cgrp, > >+struct cgroup *ancestor) > > (const struct group *cgrp, const struct group *an

Re: [PATCH net] net: fix feature changes on devices without ndo_set_features

2015-11-17 Thread Sergei Shtylyov
Hello. On 11/13/2015 04:54 PM, Nikolay Aleksandrov wrote: From: Nikolay Aleksandrov When __netdev_update_features() was updated to ensure some features are disabled on new lower devices, an error was introduced for devices which don't have the ndo_set_features() method set. Before we'll just

Re: [PATCH iptables] libxt_cgroup2: add support for cgroup2 path matching

2015-11-17 Thread Jan Engelhardt
On Tuesday 2015-11-17 20:42, Tejun Heo wrote: >+static void cgroup2_save(const void *ip, const struct xt_entry_match *match) >+{ >+ const struct xt_cgroup2_info *info = (void *)match->data; >+ >+ printf("%s --path %s", info->invert ? " !" : "", info->path); >+} Can cgroup path names con

Re: [PATCH 3/3] dl2k: Implement suspend

2015-11-17 Thread Francois Romieu
Ondrej Zary : [...] > diff --git a/drivers/net/ethernet/dlink/dl2k.c > b/drivers/net/ethernet/dlink/dl2k.c > index 9e9baa0..b53dfa7 100644 > --- a/drivers/net/ethernet/dlink/dl2k.c > +++ b/drivers/net/ethernet/dlink/dl2k.c > @@ -1824,11 +1824,57 @@ rio_remove1 (struct pci_dev *pdev) > } >

Re: [PATCH 5/5] netfilter: implement xt_cgroup2 match

2015-11-17 Thread Jan Engelhardt
On Tuesday 2015-11-17 20:40, Tejun Heo wrote: >@@ -0,0 +1,14 @@ >+#ifndef _XT_CGROUP2_H >+#define _XT_CGROUP2_H >+ >+#include >+ >+struct xt_cgroup2_info { >+ charpath[PATH_MAX]; >+ __u8invert; Should be included? (For PATH_MAX)

Re: [PATCH 1/5] cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it

2015-11-17 Thread Jan Engelhardt
On Tuesday 2015-11-17 20:40, Tejun Heo wrote: >+static inline bool cgroup_is_descendant(struct cgroup *cgrp, >+ struct cgroup *ancestor) (const struct group *cgrp, const struct group *ancestor) >+{ >+ if (cgrp->root != ancestor->root || cgrp->level < anc

Re: [PATCH 1/3] dl2k: Handle memory allocation errors in alloc_list

2015-11-17 Thread Francois Romieu
Ondrej Zary : > If memory allocation fails in alloc_list(), free the already allocated > memory and return -ENODEV. In rio_open(), call alloc_list() first and > abort if it fails. Move HW access (set RFDListPtr) out ot alloc_list(). > > Signed-off-by: Ondrej Zary ENODEV vs ENOMEM aside, it's ok

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue (w/ Fixes:)

2015-11-17 Thread Rainer Weikusat
Rainer Weikusat writes: [...] > This leaves only the option of a somewhat incorrect solution and what is > or isn't acceptable in this respect is somewhat difficult to decide. The > basic options would be [...] > - retry sending a limited number of times, eg, once, before > retu

Re: [PATCH 2/5] kernfs: implement kernfs_walk_and_get()

2015-11-17 Thread Jan Engelhardt
On Tuesday 2015-11-17 22:20, David Miller wrote: >> +static char path_buf[PATH_MAX]; /* protected by kernfs_mutex */ >> +int len = strlen(path); > ... >> +if (len >= PATH_MAX) >> +return NULL; >> + >> +memcpy(path_buf, path, len + 1); > > static char path_buf[PATH

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

2015-11-17 Thread Alexander Aring
This patch adds a static inline function ipv6_addr_prefix_cpy which copies a ipv6 address prefix(argument pfx) into the ipv6 address prefix. The prefix len is given by plen as bits. This function mainly based on ipv6_addr_prefix which copies one address prefix from address into a new ipv6 address d

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

2015-11-17 Thread Alexander Aring
This patch will introduce a 6lowpan entry into the debugfs if enabled. Inside this 6lowpan directory we create a subdirectories of all 6lowpan interfaces to offer a per interface debugfs support. Signed-off-by: Alexander Aring --- include/net/6lowpan.h | 6 - net/6lowpan/6lowpan_i.h

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

2015-11-17 Thread Alexander Aring
This patch introduce support for IPHC stateful address compression. It will offer three debugfs per interface entries, which are: - dci_table: destination context indentifier table - sci_table: source context indentifier table - mcast_sci_table: multicast context identifier table Example to se

[RFCv2 bluetooth-next 0/3] 6lowpan: debugfs and stateful compression support

2015-11-17 Thread Alexander Aring
Hi, This patch based on the work of Lukasz Duda. It doesn't contain any interface lookup methods since we have a generic private dataroom per 6lowpan interface. Also I dropped the list implementation and do a simple array one. It also contains support for multicast stateful compression. To acces

[PATCH] hdlc: fix null-deref on allocation failure

2015-11-17 Thread Stephen Hemminger
If alloc_netdev() failed and return NULL, then the next instruction would dereference it. Found by Coverity. Compile tested only. Not sure if anyone still uses this driver (or the whole WAN subsystem). Signed-off-by: Stephen Hemminger --- a/drivers/net/wan/hdlc_fr.c 2015-08-18 17:45:21.41452530

[PATCH] fm10k: fix memory leak

2015-11-17 Thread Stephen Hemminger
This was detected by Coverity. The function skb_cow_head leaves skb alone on failure, so caller needs to free. Signed-off-by: Stephen Hemminger --- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c 2015-11-17 13:33:40.032694657 -0800 +++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c 201

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

2015-11-17 Thread Johannes Weiner
On Tue, Nov 17, 2015 at 11:18:50PM +0300, Vladimir Davydov wrote: > AFAIK vmpressure was designed to allow userspace to tune hard limits of > cgroups in accordance with their demands, in which case the way how > vmpressure notifications work makes sense. You can still do that when the reporting ha

Re: [PATCH 4/5] sock, cgroup: add sock->sk_cgroup

2015-11-17 Thread Tejun Heo
Hello, Daniel. On Tue, Nov 17, 2015 at 10:46:30PM +0100, Daniel Borkmann wrote: > Do you see a way forward where the new behavior could be enabled f.e. > as an extra mount option (that long-term would be made default, while > deprecating the current behavior) on net_cls et al? There are various >

Re: [PATCH 4/5] sock, cgroup: add sock->sk_cgroup

2015-11-17 Thread Tejun Heo
Hello, Daniel. On Tue, Nov 17, 2015 at 10:48:46PM +0100, Daniel Borkmann wrote: > >Unfortunately, sk->sk_cgrp_prioidx is an arbitrary value which can be > >configured through "net_cls.classid". :( > > Hmm, isn't net_prio independent of net_cls? Ah, yeah, I was mixing up the two but the story is

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue (w/ Fixes:)

2015-11-17 Thread Rainer Weikusat
Rainer Weikusat writes: [...] > The basic options would be > > - return EAGAIN even if sending became possible (Jason's most > recent suggestions) > > - retry sending a limited number of times, eg, once, before > returning EAGAIN, on the grounds that this is nicer

Re: Hardware capabilities and bonding offload

2015-11-17 Thread Simon Horman
On Mon, Nov 16, 2015 at 08:10:27AM -0800, John Fastabend wrote: > On 15-11-16 07:30 AM, Jiri Pirko wrote: > > Mon, Nov 16, 2015 at 10:29:12AM CET, pjonn...@broadcom.com wrote: > >> Hello, > >> > >> I am looking to offload bond interfaces to hardware for forwarding. Linux > >> allows for configuri

Re: [PATCH 4/5] sock, cgroup: add sock->sk_cgroup

2015-11-17 Thread Daniel Borkmann
On 11/17/2015 10:31 PM, Tejun Heo wrote: Hello, David. On Tue, Nov 17, 2015 at 04:25:54PM -0500, David Miller wrote: In preparation, this patch adds sock->sk_cgroup which points to the associated cgroup. A sock is associated on creation and stays associated to the same cgroup until freed; unfo

[GIT] Networking

2015-11-17 Thread David Miller
1) Fix list tests in netfilter ingress support, from Florian Westphal. 2) Fix reversal of input and output interfaces in ingress hook invocation, from Pablo Neira Ayuso. 3) We have a use after free in r8169, caught by Dave Jones, fixed by Francois Romieu. 4) Splice use-after-free fix in A

Re: [PATCH 4/5] sock, cgroup: add sock->sk_cgroup

2015-11-17 Thread David Miller
From: Tejun Heo Date: Tue, 17 Nov 2015 16:31:26 -0500 > I'll see if I can come up with a non-crazy way to combine the other > two fields with ->sk_cgroup. Thank you. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More ma

Re: [PATCH 4/5] sock, cgroup: add sock->sk_cgroup

2015-11-17 Thread Daniel Borkmann
Hi Tejun, On 11/17/2015 08:40 PM, Tejun Heo wrote: ... While it is possible to solve these issues from controller side by implementing hierarchical allowable ranges in both controllers, it would involve quite a bit of complexity in the controllers and further obfuscate network configuration as i

udp: remove duplicate include

2015-11-17 Thread Stephen Hemminger
Signed-off-by: Stephen Hemminger --- a/net/ipv4/udp.c2015-11-17 13:34:11.977265403 -0800 +++ b/net/ipv4/udp.c2015-11-17 13:34:11.973265332 -0800 @@ -100,7 +100,6 @@ #include #include #include -#include #include #include #include -- To unsubscribe from this list: send the li

[PATCH net-next] net: encx24j600: quiet logging noise on open

2015-11-17 Thread jon
From: Jon Ringle When encx24j600 is open and closed many times due to userspace polling the interface, the log gets noise with this log message. Change logging level to debug Signed-off-by: Jon Ringle --- drivers/net/ethernet/microchip/encx24j600.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue (w/ Fixes:)

2015-11-17 Thread Rainer Weikusat
David Miller writes: > From: Rainer Weikusat > Date: Mon, 16 Nov 2015 22:28:40 + > >> An AF_UNIX datagram socket being the client in an n:1 association with >> some server socket is only allowed to send messages to the server if the >> receive queue of this socket contains at most sk_max_ack_

Re: [PATCH 4/5] sock, cgroup: add sock->sk_cgroup

2015-11-17 Thread Tejun Heo
Hello, David. On Tue, Nov 17, 2015 at 04:25:54PM -0500, David Miller wrote: > > In preparation, this patch adds sock->sk_cgroup which points to the > > associated cgroup. A sock is associated on creation and stays > > associated to the same cgroup until freed; unfortunately, this ends up > > addi

Re: [PATCH 4/5] sock, cgroup: add sock->sk_cgroup

2015-11-17 Thread David Miller
From: Tejun Heo Date: Tue, 17 Nov 2015 14:40:39 -0500 > In preparation, this patch adds sock->sk_cgroup which points to the > associated cgroup. A sock is associated on creation and stays > associated to the same cgroup until freed; unfortunately, this ends up > adding another cgroup field to st

Re: How to do TCP tx checksums

2015-11-17 Thread Ben Greear
On 11/16/2015 09:02 PM, Tom Herbert wrote: On Mon, Nov 16, 2015 at 4:20 PM, Ben Greear wrote: Hello! I'm hacking on (my already hacked) pktgen, trying to get it to send TCP frames. And, having issues getting checksums to work properly. I'm trying this: struct iphdr *iph = ip_hdr(skb

Re: [PATCH 2/5] kernfs: implement kernfs_walk_and_get()

2015-11-17 Thread Tejun Heo
On Tue, Nov 17, 2015 at 04:20:40PM -0500, David Miller wrote: > From: Tejun Heo > Date: Tue, 17 Nov 2015 14:40:37 -0500 > > > + static char path_buf[PATH_MAX]; /* protected by kernfs_mutex */ > > + int len = strlen(path); > ... > > + if (len >= PATH_MAX) > > + return NULL; > > +

Re: [PATCH 2/5] kernfs: implement kernfs_walk_and_get()

2015-11-17 Thread David Miller
From: Tejun Heo Date: Tue, 17 Nov 2015 14:40:37 -0500 > + static char path_buf[PATH_MAX]; /* protected by kernfs_mutex */ > + int len = strlen(path); ... > + if (len >= PATH_MAX) > + return NULL; > + > + memcpy(path_buf, path, len + 1); static char path_buf[P

Re: [PATCH net-next] net: phy: Use interrupts when available in NOLINK state

2015-11-17 Thread David Miller
From: Andrew Lunn Date: Mon, 16 Nov 2015 23:36:46 +0100 > The NOLINK state will poll the phy once a second to see if the link > has come up. If the phy has an interrupt line, this polling can be > skipped, since the phy should interrupt when the link returns. > > Signed-off-by: Andrew Lunn App

Re: [PATCH net-next] phy: marvell: Add support for 88E1540 PHY

2015-11-17 Thread David Miller
From: Andrew Lunn Date: Mon, 16 Nov 2015 23:34:41 +0100 > The 88E1540 can be found embedded in the Marvell 88E6352 switch. It > is compatible with the 88E1510, so add support for it, using the > 88E1510 specific functions. > > Signed-off-by: Andrew Lunn Applied. -- To unsubscribe from this li

Re: [PATCH] packet: Don't check frames_per_block against negative values

2015-11-17 Thread David Miller
From: Tobias Klauser Date: Tue, 17 Nov 2015 10:38:36 +0100 > rb->frames_per_block is an unsigned int, thus can never be negative. > > Also fix spacing in the calculation of frames_per_block. > > Signed-off-by: Tobias Klauser Applied. -- To unsubscribe from this list: send the line "unsubscrib

Re: [PATCH] packet: Use PAGE_ALIGNED macro

2015-11-17 Thread David Miller
From: Tobias Klauser Date: Tue, 17 Nov 2015 10:40:21 +0100 > Use PAGE_ALIGNED(...) instead of open-coding it. > > Signed-off-by: Tobias Klauser Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo inf

Re: [PATCH net] MAINTAINERS: Update Mellanox's Eth NIC driver entries

2015-11-17 Thread David Miller
From: Or Gerlitz Date: Tue, 17 Nov 2015 18:25:07 +0200 > Eugenia (Jenny) Emantayev is replacing Amir Vadai as the > mlx4 Ethernet driver maintainer. > > Saeed Mahameed is assigned to maintain mlx5 Eth functionality. > > Signed-off-by: Or Gerlitz Applied. -- To unsubscribe from this list: sen

Re: [PATCH net v2] rtnetlink: fix frame size warning in rtnl_fill_ifinfo

2015-11-17 Thread David Miller
From: Hannes Frederic Sowa Date: Tue, 17 Nov 2015 14:16:52 +0100 > Fix the following warning: > > CC net/core/rtnetlink.o > net/core/rtnetlink.c: In function ‘rtnl_fill_ifinfo’: > net/core/rtnetlink.c:1308:1: warning: the frame size of 2864 bytes is larger > than 2048 bytes [-Wframe-larg

Re: [PATCH net] af_unix: take receive queue lock while appending new skb

2015-11-17 Thread David Miller
From: Hannes Frederic Sowa Date: Tue, 17 Nov 2015 15:10:59 +0100 > While possibly in future we don't necessarily need to use > sk_buff_head.lock this is a rather larger change, as it affects the > af_unix fd garbage collector, diag and socket cleanups. This is too much > for a stable patch. > >

Re: [PATCH net] net/core: revert "net: fix __netdev_update_features return.." and add comment

2015-11-17 Thread David Miller
From: Nikolay Aleksandrov Date: Tue, 17 Nov 2015 15:49:06 +0100 > From: Nikolay Aleksandrov > > This reverts commit 00ee59271777 ("net: fix __netdev_update_features return > on ndo_set_features failure") > and adds a comment explaining why it's okay to return a value other than > 0 upon error.

Re: [PATCH v1 net] net: use skb_clone to avoid alloc_pages failure.

2015-11-17 Thread David Miller
From: martinbj2...@gmail.com Date: Tue, 17 Nov 2015 20:49:30 +0800 > From: Martin Zhang > > 1. new skb only need dst and ip address(v4 or v6). > 2. skb_copy may need high order pages, which is very rare on long running > server. > > Signed-off-by: Junwei Zhang > Signed-off-by: Martin Zhang

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

2015-11-17 Thread Vladimir Davydov
On Mon, Nov 16, 2015 at 01:53:16PM -0500, Johannes Weiner wrote: > On Sun, Nov 15, 2015 at 04:54:57PM +0300, Vladimir Davydov wrote: > > On Thu, Nov 12, 2015 at 06:41:33PM -0500, Johannes Weiner wrote: > > > Let the networking stack know when a memcg is under reclaim pressure > > > so that it can c

Re: [PATCH] unix: avoid use-after-free in ep_remove_wait_queue (w/ Fixes:)

2015-11-17 Thread David Miller
From: Rainer Weikusat Date: Mon, 16 Nov 2015 22:28:40 + > An AF_UNIX datagram socket being the client in an n:1 association with > some server socket is only allowed to send messages to the server if the > receive queue of this socket contains at most sk_max_ack_backlog > datagrams. This impl

Re: [PATCH V4 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-17 Thread David Miller
From: Yang Shi Date: Mon, 16 Nov 2015 14:35:35 -0800 > Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP > in prologue in order to get the correct stack backtrace. > > However, ARM64 JIT used FP (x29) as eBPF fp register, FP is subjected to > change during function call so

Re: Asterisk deadlocks since Kernel 4.1

2015-11-17 Thread Thomas Gleixner
On Tue, 17 Nov 2015, Stefan Priebe wrote: > I've now also two gdb backtraces from two crashes: > http://pastebin.com/raw.php?i=yih5jNt8 > > http://pastebin.com/raw.php?i=kGEcvH4T They don't tell me anything as I have no idea of the inner workings of asterisk. You might be better of to talk to the

[PATCHSET] netfilter, cgroup: implement xt_cgroup2 match

2015-11-17 Thread Tejun Heo
Hello, In cgroup v1, dealing with cgroup membership was difficult because the number of membership associations was unbound. As a result, cgroup v1 grew several controllers whose primary purpose is either tagging membership or pull in configuration knobs from other subsystems so that cgroup membe

[PATCH 2/5] kernfs: implement kernfs_walk_and_get()

2015-11-17 Thread Tejun Heo
Implement kernfs_walk_and_get() which is similar to kernfs_find_and_get() but can walk a path instead of just a name. Signed-off-by: Tejun Heo Cc: Greg Kroah-Hartman --- fs/kernfs/dir.c| 48 include/linux/kernfs.h | 12 2 fil

[PATCH 1/5] cgroup: record ancestor IDs and reimplement cgroup_is_descendant() using it

2015-11-17 Thread Tejun Heo
cgroup_is_descendant() currently walks up the hierarchy and compares each ancestor to the cgroup in question. While enough for cgroup core usages, this can't be used in hot paths to test cgroup membership. This patch adds cgroup->ancestor_ids[] which records the IDs of all ancestors including self

[PATCH 4/5] sock, cgroup: add sock->sk_cgroup

2015-11-17 Thread Tejun Heo
In cgroup v1, dealing with cgroup membership was difficult because the number of membership associations was unbound. As a result, cgroup v1 grew several controllers whose primary purpose is either tagging membership or pull in configuration knobs from other subsystems so that cgroup membership te

[PATCH iptables] libxt_cgroup2: add support for cgroup2 path matching

2015-11-17 Thread Tejun Heo
This patch adds the extension for the xt_cgroup2 which matches packets based on the v2 cgroup path of the associated socket. Signed-off-by: Tejun Heo Cc: Daniel Borkmann --- extensions/libxt_cgroup2.c | 70 +++ extensions/libxt_cgroup2.man |

[PATCH 3/5] cgroup: implement cgroup_get_from_path() and expose cgroup_put()

2015-11-17 Thread Tejun Heo
Implement cgroup_get_path() using kernfs_walk_and_get() which obtains a default hierarchy cgroup from its path. This will be used to allow cgroup path based matching from outside cgroup proper - e.g. networking and perf. Signed-off-by: Tejun Heo --- include/linux/cgroup.h | 7 +++ kernel/c

[PATCH 5/5] netfilter: implement xt_cgroup2 match

2015-11-17 Thread Tejun Heo
This patch implements xt_cgroup2 which matches cgroup2 membership of the associated socket. The match is recursive and invertible. For rationales on introducing another cgroup based match, please refer to a preceding commit "sock, cgroup: add sock->sk_cgroup". Signed-off-by: Tejun Heo Cc: Danie

Re: How to do TCP tx checksums

2015-11-17 Thread Daniel Borkmann
On 11/17/2015 07:32 PM, Ben Greear wrote: On 11/17/2015 10:26 AM, Eric Dumazet wrote: On Tue, 2015-11-17 at 09:44 -0800, Ben Greear wrote: And in case it helps, here is the output from dmesg. This is an Ethernet frame, and in this case csum-start is the index of the first byte of the TCP head

Re: [PATCH net] ipvlan: fix leak in ipvlan_rcv_frame

2015-11-17 Thread David Miller
From: Sabrina Dubroca Date: Mon, 16 Nov 2015 22:34:26 +0100 > Pass a **skb to ipvlan_rcv_frame so that if skb_share_check returns a > new skb, we actually use it during further processing. > > It's safe to ignore the new skb in the ipvlan_xmit_* functions, because > they call ipvlan_rcv_frame wi

Re: [PATCH net] macvlan: fix leak in macvlan_handle_frame

2015-11-17 Thread David Miller
From: Sabrina Dubroca Date: Mon, 16 Nov 2015 22:54:20 +0100 > Reset pskb in macvlan_handle_frame in case skb_share_check returned a > clone. > > Fixes: 8a4eb5734e8d ("net: introduce rx_handler results and logic around > that") > Signed-off-by: Sabrina Dubroca Applied. -- To unsubscribe from t

Re: [PATCH net] ipvlan: fix use after free of skb

2015-11-17 Thread David Miller
From: Sabrina Dubroca Date: Mon, 16 Nov 2015 22:44:53 +0100 > ipvlan_handle_frame is a rx_handler, and when it returns a value other > than RX_HANDLER_CONSUMED (here, NET_RX_DROP aka RX_HANDLER_ANOTHER), > __netif_receive_skb_core expects that the skb still exists and will > process it further, b

Re: [PATCH 0/2] Fix issues with vlans without REORDER_HEADER

2015-11-17 Thread David Miller
From: Vladislav Yasevich Date: Mon, 16 Nov 2015 15:43:43 -0500 > A while ago Phil Sutter brought up an issue with vlans without > REORDER_HEADER and bridges. The problem was that if a vlan > without REORDER_HEADER was a port in the bridge, the bridge ended > up forwarding corrupted packets that

Re: [PATCH] via-velocity: unconditionally drop frames with bad l2 length

2015-11-17 Thread David Miller
From: Timo Teräs Date: Mon, 16 Nov 2015 14:36:32 +0200 > By default the driver allowed incorrect frames to be received. What is > worse the code does not handle very short frames correctly. The FCS > length is unconditionally subtracted, and the underflow can cause > skb_put to be called with lar

Re: How to do TCP tx checksums

2015-11-17 Thread David Miller
From: Eric Dumazet Date: Tue, 17 Nov 2015 10:26:47 -0800 > Anyway, just use trafgen and get ~6 Mpps, more easily than with > pktgen. +1 -- 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.k

Re: Asterisk deadlocks since Kernel 4.1

2015-11-17 Thread Stefan Priebe
Am 17.11.2015 um 20:15 schrieb Thomas Gleixner: On Tue, 17 Nov 2015, Stefan Priebe - Profihost AG wrote: since Upgrading our Asterisk System from Kernel 3.18.17 to 4.1.13 it deadlocks every few hours (kill -9 is the only thing working). Booting with 3.18 again let it run smooth again. An strace

Re: next build: 235 warnings 3 failures (next/next-20151117)

2015-11-17 Thread Arnd Bergmann
On Tuesday 17 November 2015 17:12:37 Will Deacon wrote: > On Tue, Nov 17, 2015 at 06:03:40PM +0100, Arnd Bergmann wrote: > > On Tuesday 17 November 2015 16:44:53 Will Deacon wrote: > > > > 8< > > > > Subject: ARM64: make smp_load_acquire() work with const arguments > > > > > > > > smp_load_acq

  1   2   >