Re: [PATCH 1/1] r8169: replace init_timer with setup_timer

2017-03-12 Thread David Miller
From: Zhu Yanjun Date: Sun, 12 Mar 2017 05:02:54 -0400 > Replace init_timer with setup_timer to simplify the source code. > > Signed-off-by: Zhu Yanjun Applied.

Re: [PATCH net-next v2 00/17] net: dsa: mv88e6xxx: rework ATU support

2017-03-12 Thread David Miller
From: Vivien Didelot Date: Sat, 11 Mar 2017 16:12:46 -0500 > The purpose of this patch series is to rework the code related to the > Address Translation Unit (ATU), and bring support for it to the 88E6390 > family of switch chips. > > All Global (1) ATU related code have been reworked and moved

Re: [PATCH net] bpf: improve read-only handling

2017-03-12 Thread David Miller
From: Daniel Borkmann Date: Sat, 11 Mar 2017 16:55:49 +0100 > Improve bpf_{prog,jit_binary}_{un,}lock_ro() by throwing a > one-time warning in case of an error when the image couldn't > be set read-only, and also mark struct bpf_prog as locked when > bpf_prog_lock_ro() was called. > > Reason for

Re: [patch net-next 0/9] mlxsw: Add support for TC flower offload statistics

2017-03-12 Thread David Miller
From: Jiri Pirko Date: Sat, 11 Mar 2017 09:42:50 +0100 > Arkadi says: > This patchset adds support for retrieving TC flower statistics for > offloaded rules, which includes packets count, bytes count and last used > time stamp. Currently The statistics are gathered on a per-rule basis. > > This

[net-next:master 53/61] net/sched/sch_tbf.c:399:3: note: in expansion of macro 'if'

2017-03-12 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: 429a372e3ec020534bd314dca94e5281dc453d29 commit: 49b499718fa1b0d639663cfd03085b9bfd23cdc8 [53/61] net: sched: make default fifo qdiscs appear in the dump config: i386-randconfig-x077-201711 (attached as .con

Re: [PATCH] mpls: Send route delete notifications when router module is unloaded

2017-03-12 Thread David Miller
From: David Ahern Date: Fri, 10 Mar 2017 09:46:15 -0800 > When the mpls_router module is unloaded, mpls routes are deleted but > notifications are not sent to userspace leaving userspace caches > out of sync. Add the call to mpls_notify_route in mpls_net_exit as > routes are freed. > > Fixes: 01

Re: [PATCH] ambassador: use setup_timer

2017-03-12 Thread David Miller
From: Geliang Tang Date: Sat, 11 Mar 2017 08:46:56 +0800 > Use setup_timer() instead of init_timer() to simplify the code. > > Signed-off-by: Geliang Tang Applied.

Re: [PATCH net] selftests/bpf: fix broken build

2017-03-12 Thread David Miller
From: Alexei Starovoitov Date: Fri, 10 Mar 2017 22:05:55 -0800 > Recent merge of 'linux-kselftest-4.11-rc1' tree broke bpf test build. > None of the tests were building and test_verifier.c had tons of compiler > errors. > Fix it and add #ifdef CAP_IS_SUPPORTED to support old versions of libcap.

Re: [PATCH] drop_monitor: use setup_timer

2017-03-12 Thread David Miller
From: Geliang Tang Date: Sat, 11 Mar 2017 08:46:59 +0800 > Use setup_timer() instead of init_timer() to simplify the code. > > Signed-off-by: Geliang Tang Applied.

Re: [PATCH] mpls: Do not decrement alive counter for unregister events

2017-03-12 Thread David Miller
From: David Ahern Date: Fri, 10 Mar 2017 14:11:39 -0800 > Multipath routes can be rendered usesless when a device in one of the > paths is deleted. For example: > > $ ip -f mpls ro ls > 100 > nexthop as to 200 via inet 172.16.2.2 dev virt12 > nexthop as to 300 via inet 172.16.3.2 d

Re: [PATCH net v4] xen-netback: fix race condition on XenBus disconnect

2017-03-12 Thread David Miller
From: Igor Druzhinin Date: Fri, 10 Mar 2017 21:36:22 + > In some cases during XenBus disconnect event handling and subsequent > queue resource release there may be some TX handlers active on > other processors. Use RCU in order to synchronize with them. > > Signed-off-by: Igor Druzhinin Ap

Re: [PATCH net-next 00/13] nfp: XDP adjust head support

2017-03-12 Thread David Miller
From: Jakub Kicinski Date: Fri, 10 Mar 2017 10:38:26 -0800 > This series adds support for XDP adjust head. Bulk of the code > is actually just paying technical debt. On reconfiguration request > nfp was allocating new resources separately leaving device running > with the existing set of rings.

Re: [PATCH v5 net-next 0/9] prepare mac operations for multiple queues

2017-03-12 Thread David Miller
From: Joao Pinto Date: Fri, 10 Mar 2017 18:24:50 + > As agreed with David Miller, this patch-set is the first of 3 to enable > multiple queues in stmmac. > > This first one concentrates on mac operations adding functionalities as: > a) Configuration through DT > b) RX and TX scheduling algor

Re: [PATCHv3 1/4] rds: ib: drop unnecessary rdma_reject

2017-03-12 Thread Yanjun Zhu
On 2017/3/13 14:32, Leon Romanovsky wrote: On Mon, Mar 13, 2017 at 01:43:45AM -0400, Zhu Yanjun wrote: When rdma_accept fails, rdma_reject is called in it. As such, it is not necessary to execute rdma_reject again. It is not always correct, according to the code, rdma_accept can fail and will

Re: [PATCH v2 0/9] net: stmmac: Fixes and Tegra186 support

2017-03-12 Thread David Miller
From: Thierry Reding Date: Fri, 10 Mar 2017 17:34:52 +0100 > This series of patches start with a few cleanups that I ran across while > adding Tegra186 support to the stmmac driver. It then adds code for FIFO > size parsing from feature registers and finally enables support for the > incarnation

Re: [PATCH net] act_connmark: avoid crashing on malformed nlattrs with null parms

2017-03-12 Thread David Miller
From: Etienne Noss Date: Fri, 10 Mar 2017 16:55:32 +0100 > tcf_connmark_init does not check in its configuration if TCA_CONNMARK_PARMS > is set, resulting in a null pointer dereference when trying to access it. ... > Signed-off-by: Étienne Noss > Signed-off-by: Victorien Molle Applied and que

Re: [PATCHv3 1/4] rds: ib: drop unnecessary rdma_reject

2017-03-12 Thread Leon Romanovsky
On Mon, Mar 13, 2017 at 01:43:45AM -0400, Zhu Yanjun wrote: > When rdma_accept fails, rdma_reject is called in it. As such, it is > not necessary to execute rdma_reject again. It is not always correct, according to the code, rdma_accept can fail and will return EINVAL and skip calling to rdma_reje

Re: [net-next v1] vxlan: use appropriate family on L3 miss

2017-03-12 Thread David Miller
From: Vincent Bernat Date: Fri, 10 Mar 2017 16:30:24 +0100 > When sending a L3 miss, the family is set to AF_INET even for IPv6. This > causes userland (eg "ip monitor") to be confused. Ensure we send the > appropriate family in this case. For L2 miss, keep using AF_INET. > > Signed-off-by: Vinc

Re: [PATCH] vlan: support ingress/egress priority map flushing

2017-03-12 Thread David Miller
From: Thierry Du Tre Date: Fri, 10 Mar 2017 15:41:35 +0100 > --- a/include/uapi/linux/if_vlan.h > +++ b/include/uapi/linux/if_vlan.h > @@ -20,6 +20,8 @@ > enum vlan_ioctl_cmds { > ADD_VLAN_CMD, > DEL_VLAN_CMD, > + FLUSH_VLAN_INGRESS_PRIORITY_CMD, > + FLUSH_VLAN_EGRESS_PRIORIT

Re: [PATCH] Make IP 'forwarding' doc more precise

2017-03-12 Thread David Miller
From: Neil Jerram Date: Fri, 10 Mar 2017 12:24:57 + > It wasn't clear if the 'forwarding' setting needs to be enabled on the > interface that packets are received from, or on the interface that > packets are forwarded to, or both. > > In fact (according to my code reading) the setting is rel

Re: [PATCH v4 net-next 1/1] net: Eliminate duplicated codes by creating one new function in_dev_select_addr

2017-03-12 Thread David Miller
From: f...@ikuai8.com Date: Fri, 10 Mar 2017 12:38:47 +0800 > From: Gao Feng > > There are two duplicated loops codes which used to select right > address in current codes. Now eliminate these codes by creating > one new function in_dev_select_addr. > > Signed-off-by: Gao Feng Applied.

Re: [PATCHv2 net-next 0/7] sctp: add receiver-side procedures for stream reconf asoc reset and add streams and response

2017-03-12 Thread David Miller
From: Xin Long Date: Fri, 10 Mar 2017 12:11:05 +0800 > Patch 2/7, 4/7, 5/7, 6/7 are to implement the process of asoc reset request, > add streams requests and all kinds of responses. > > Patch 1/7 and 3/7 are ahead of 2/7 and 4/7 to add two event notification > for asoc reset and add streams. >

Re: [PATCH net-next] liquidio: optimize DMA in NUMA systems

2017-03-12 Thread David Miller
From: Felix Manlunas Date: Thu, 9 Mar 2017 17:03:24 -0800 > From: VSR Burru > > Optimize DMA in NUMA systems by allocating memory from NUMA node that NIC > is plugged in to; DMA will no longer cross NUMA nodes. If NIC IRQs are > pinned to a local CPU, that CPU's access to the DMA'd data is als

Re: [PATCH net-next 0/2] netvsc: fix module removal hangs

2017-03-12 Thread David Miller
From: Stephen Hemminger Date: Thu, 9 Mar 2017 15:04:13 -0800 > A couple of patches are necessary to make netvsc driver module > removable again. Series applied, thanks.

Re: [PATCH net] netvsc: handle select_queue when device is being removed

2017-03-12 Thread David Miller
From: Stephen Hemminger Date: Thu, 9 Mar 2017 14:58:29 -0800 > Move the send indirection table from the inner device (netvsc) > to the network device context. > > It is possible that netvsc_device is not present (remove in progress). > This solves potential use after free issues when packet is

Re: [PATCH] net: ethernet: aquantia: set net_device mtu when mtu is changed

2017-03-12 Thread David Miller
From: David Arcari Date: Wed, 8 Mar 2017 16:33:21 -0500 > When the aquantia device mtu is changed the net_device structure is not > updated. As a result the ip command does not properly reflect the mtu change. > > Commit 5513e16421cb incorrectly assumed that __dev_set_mtu() was making the > as

Re: [net-next v2 00/10] QorIQ DPAA 1 updates

2017-03-12 Thread David Miller
From: Madalin Bucur Date: Thu, 9 Mar 2017 16:36:55 +0200 > This patch set introduces a series of fixes and features to the DPAA 1 > drivers. Besides activating hardware Rx checksum offloading, four traffic > classes are added for Tx traffic prioritisation. > > The changes are also available on t

Re: [PATCH v3 1/2] net: sched: make default fifo qdiscs appear in the dump

2017-03-12 Thread David Miller
From: Jiri Kosina Date: Wed, 8 Mar 2017 16:03:32 +0100 (CET) > From: Jiri Kosina > > The original reason [1] for having hidden qdiscs (potential scalability > issues in qdisc_match_from_root() with single linked list in case of large > amount of qdiscs) has been invalidated by 59cc1f61f0 ("net:

Re: [PATCH net-next v2] net: ipv6: Add early demux handler for UDP unicast

2017-03-12 Thread David Miller
From: Subash Abhinov Kasiviswanathan Date: Wed, 8 Mar 2017 16:36:49 -0700 > While running a single stream UDPv6 test, we observed that amount > of CPU spent in NET_RX softirq was much greater than UDPv4 for an > equivalent receive rate. The test here was run on an ARM64 based > Android system. O

[PATCHv3 4/4] rds: ib: unmap the scatter/gather list when error

2017-03-12 Thread Zhu Yanjun
When some errors occur, the scatter/gather list mapped to DMA addresses should be handled. Cc: Joe Jin Cc: Junxiao Bi Acked-by: Santosh Shilimkar Signed-off-by: Zhu Yanjun --- net/rds/ib_fmr.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/net/

[PATCHv3 3/4] rds: ib: add the static type to the function

2017-03-12 Thread Zhu Yanjun
The function rds_ib_map_fmr is used only in the ib_fmr.c file. As such, the static type is added to limit it in this file. Cc: Joe Jin Cc: Junxiao Bi Acked-by: Santosh Shilimkar Signed-off-by: Zhu Yanjun --- net/rds/ib_fmr.c | 5 +++-- net/rds/ib_mr.h | 2 -- 2 files changed, 3 insertions(+)

[PATCHv3 1/4] rds: ib: drop unnecessary rdma_reject

2017-03-12 Thread Zhu Yanjun
When rdma_accept fails, rdma_reject is called in it. As such, it is not necessary to execute rdma_reject again. Cc: Joe Jin Cc: Junxiao Bi Acked-by: Santosh Shilimkar Signed-off-by: Zhu Yanjun --- net/rds/ib_cm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/rds

[PATCHv3 0/4] rds: ib: trivial patches

2017-03-12 Thread Zhu Yanjun
v2 -> v3 remove err from messages. Zhu Yanjun (4): rds: ib: drop unnecessary rdma_reject rds: ib: remove redundant ib_dealloc_fmr rds: ib: add the static type to the function rds: ib: unmap the scatter/gather list when error net/rds/ib_cm.c | 5 ++--- net/rds/ib_fmr.c | 38

[PATCHv3 2/4] rds: ib: remove redundant ib_dealloc_fmr

2017-03-12 Thread Zhu Yanjun
The function ib_dealloc_fmr will never be called. As such, it should be removed. Cc: Joe Jin Cc: Junxiao Bi Reviewed-by: Yuval Shaia Reviewed-by: Johannes Thumshirn Acked-by: Santosh Shilimkar Signed-off-by: Zhu Yanjun --- net/rds/ib_fmr.c | 7 ++- 1 file changed, 2 insertions(+), 5 del

[PATCH] net: use net->count to check whether a netns is alive or not

2017-03-12 Thread Andrei Vagin
The previous idea was to check whether a net namespace is in net_exit_list or not. It doesn't work, because net->exit_list is used in __register_pernet_operations and __unregister_pernet_operations where all namespaces are added to a temporary list to make cleanup in a error case, so list_empty(&ne

Re: [PATCH] net: tundra: tsi108: use new api ethtool_{get|set}_link_ksettings

2017-03-12 Thread David Miller
From: Philippe Reynes Date: Mon, 6 Mar 2017 23:26:09 +0100 > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > As I don't have the hardware, I'd be very pleased if > someone may test this patch. > > Signed-off-by: Philippe Reynes

Re: [PATCH] net: hyperv: use new api ethtool_{get|set}_link_ksettings

2017-03-12 Thread David Miller
From: Philippe Reynes Date: Wed, 8 Mar 2017 23:41:04 +0100 > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > As I don't have the hardware, I'd be very pleased if > someone may test this patch. > > Signed-off-by: Philippe Reynes

Re: [PATCH] net: via: via-velocity: use new api ethtool_{get|set}_link_ksettings

2017-03-12 Thread David Miller
From: Philippe Reynes Date: Wed, 8 Mar 2017 22:20:20 +0100 > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > As I don't have the hardware, I'd be very pleased if > someone may test this patch. > > Signed-off-by: Philippe Reynes

Re: [PATCH] net: fjes: use new api ethtool_{get|set}_link_ksettings

2017-03-12 Thread David Miller
From: Philippe Reynes Date: Wed, 8 Mar 2017 23:16:11 +0100 > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > As I don't have the hardware, I'd be very pleased if > someone may test this patch. > > Signed-off-by: Philippe Reynes

Re: [PATCH v2] net: intel: ixgbe: use new api ethtool_{get|set}_link_ksettings

2017-03-12 Thread David Miller
From: Philippe Reynes Date: Tue, 7 Mar 2017 23:32:25 +0100 > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > As I don't have the hardware, I'd be very pleased if > someone may test this patch. > > Signed-off-by: Philippe Reynes

Re: [PATCH] net: via: via-rhine: use new api ethtool_{get|set}_link_ksettings

2017-03-12 Thread David Miller
From: Philippe Reynes Date: Tue, 7 Mar 2017 23:46:16 +0100 > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > As I don't have the hardware, I'd be very pleased if > someone may test this patch. > > Signed-off-by: Philippe Reynes

Re: tun offloads bug

2017-03-12 Thread David Miller
From: Yaroslav Isakov Date: Wed, 8 Mar 2017 23:29:53 +0300 > Hello! > I've found a bug in TUN/TAP driver with offloads - when Qemu is trying > to set offloads on tap device, there is no error, but offloads are not > appied. > > The cause of this is that udev in recent systemd is using ethtool to

Re: [PATCH net-next v2] net: ipv4: add support for ECMP hash policy choice

2017-03-12 Thread David Miller
From: Jakub Sitnicki Date: Wed, 08 Mar 2017 17:00:05 +0100 > On Wed, Mar 08, 2017 at 12:43 PM GMT, Nikolay Aleksandrov wrote: >> On 08/03/17 14:05, Jakub Sitnicki wrote: >>> On Tue, Mar 07, 2017 at 11:01 AM GMT, Nikolay Aleksandrov wrote: This patch adds support for ECMP hash policy choice v

Re: [PATCH] x86-32: fix tlb flushing when lguest clears PGE

2017-03-12 Thread Kees Cook
Are there nominations for most comprehensive changelog of the year? :) This is awesome. -Kees On Fri, Mar 10, 2017 at 6:31 PM, Daniel Borkmann wrote: > Fengguang reported [1] random corruptions from various locations on > x86-32 after commits d2852a224050 ("arch: add ARCH_HAS_SET_MEMORY > config

Re: [PATCH] net: usb: asix88179_178a: use new api ethtool_{get|set}_link_ksettings

2017-03-12 Thread Chris Roth
I can test it tomorrow. I'll pull a clean copy of 4.10.2, or do you suggest a different version than that? Chris On 2017-03-12 11:02 AM, Philippe Reynes wrote: > The ethtool api {get|set}_settings is deprecated. > We move this driver to new api {get|set}_link_ksettings. > > As I don't have the ha

RE: [PATCH v2] fjes: Do not load fjes driver if system does not have extended socket device.

2017-03-12 Thread Izumi, Taku
Ishimatsu-san, Sorry for my late response. > > Which tree did you apply the patch to? > > The patch can apply to net-next tree with no conflicts as follows: Not net-next but net tree: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git I'll review and test your patch soon.

[PATCH net-next] mlx4: Better use of order-0 pages in RX path

2017-03-12 Thread Eric Dumazet
When adding order-0 pages allocations and page recycling in receive path, I added issues on PowerPC, or more generally on arches with large pages. A GRO packet, aggregating 45 segments, ended up using 45 page frags on 45 different pages. Before my changes we were very likely packing up to 42 Ether

Re: [PATCHv2 1/4] rds: ib: drop unnecessary rdma_reject

2017-03-12 Thread Yanjun Zhu
On 2017/3/13 3:43, santosh.shilim...@oracle.com wrote: On 3/12/17 12:33 PM, Leon Romanovsky wrote: On Sun, Mar 12, 2017 at 04:07:55AM -0400, Zhu Yanjun wrote: When rdma_accept fails, rdma_reject is called in it. As such, it is not necessary to execute rdma_reject again. Cc: Joe Jin Cc: Junx

Re: [PATCH net-next RFC v1 00/27] afnetns: new namespace type for separation on protocol level

2017-03-12 Thread Hannes Frederic Sowa
Hi, On Sun, 2017-03-12 at 16:26 -0700, David Miller wrote: > From: Hannes Frederic Sowa > Date: Mon, 13 Mar 2017 00:01:24 +0100 > > > afnetns behaves like ordinary namespaces: clone, unshare, setns syscalls > > can work with afnetns with one limitation: one cannot cross the realm > > of a networ

Re: [PATCH net-next RFC v1 00/27] afnetns: new namespace type for separation on protocol level

2017-03-12 Thread David Miller
From: Hannes Frederic Sowa Date: Mon, 13 Mar 2017 00:01:24 +0100 > afnetns behaves like ordinary namespaces: clone, unshare, setns syscalls > can work with afnetns with one limitation: one cannot cross the realm > of a network namespace while changing the afnetns compartement. To get > into a new

[PATCH net-next RFC v1 18/27] afnetns: afnetns should influence source address selection

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- drivers/target/iscsi/cxgbit/cxgbit_cm.c | 2 +- include/linux/inetdevice.h | 5 +++-- include/net/route.h | 10 ++ net/ipv4/devinet.c | 19 --- net/ipv4/icmp.c

[PATCH net-next RFC v1 25/27] afnetns: ipv4: inherit afnetns from calling application

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- net/ipv4/devinet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 82a7389ec86faa..01bdff8a957ae1 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -838,7 +838,7 @@ static struct in

[PATCH net-next RFC v1 21/27] afnetns: add support for tcpv6

2017-03-12 Thread Hannes Frederic Sowa
Same as the support for tcpv4, we simply add the necessary checks so we just look at our own sockets. Signed-off-by: Hannes Frederic Sowa --- net/ipv6/inet6_hashtables.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/i

[PATCH net-next RFC v1 26/27] afnetns: ipv6: inherit afnetns from calling application

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- net/ipv6/addrconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 319f83a7d29dd5..3d9d24ec066a67 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -4542,7 +4542,7 @@ inet6_rtm

[PATCH net-next RFC v1 23/27] afnetns: use user_ns from afnetns for checking for binding to port < 1024

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- include/net/inet_common.h | 2 +- net/ipv4/af_inet.c| 37 ++--- net/ipv6/af_inet6.c | 2 +- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/include/net/inet_common.h b/include/net/inet_common.

[PATCH net-next RFC v1 15/27] afnetns: add ipv6_get_ifaddr_afnetns_rcu

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- include/net/addrconf.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/net/addrconf.h b/include/net/addrconf.h index e3f1920ca57968..644fa68bb4ddef 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -104,6 +10

[PATCH net-next RFC v1 16/27] afnetns: add udpv6 support

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- net/ipv6/datagram.c | 6 -- net/ipv6/udp.c | 18 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index eec27f87efaca1..cd811e8b1ba824 100644 --- a/net/ipv6/datagram.c +++

[PATCH net-next RFC v1 27/27] afnetns: allow only whitelisted protocols to operate inside afnetns

2017-03-12 Thread Hannes Frederic Sowa
We only care about inet protocols (which is IPv4 and IPv6). Other protocols, like netlink are not under control of afnetns and thus must be hardened with capabilities. Signed-off-by: Hannes Frederic Sowa --- include/net/protocol.h | 1 + net/ipv4/af_inet.c | 20 +++- net/ipv

[PATCH net-next RFC v1 22/27] afnetns: track owning namespace for inet_bind

2017-03-12 Thread Hannes Frederic Sowa
In order for a newly created afnetns to allow its processes to bind to ports lower than 1024 we need to track the to be created user namespace to check for the permissions for binding so. Signed-off-by: Hannes Frederic Sowa --- include/net/afnetns.h| 7 +-- kernel/nsproxy.c | 2

[PATCH net-next RFC v1 14/27] afnetns: check for afnetns in inet6_bind

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- include/net/addrconf.h | 3 ++- net/ipv6/addrconf.c| 12 ++-- net/ipv6/af_inet6.c| 7 +-- net/ipv6/ndisc.c | 4 ++-- net/ipv6/route.c | 2 +- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/include/net/add

[PATCH net-next RFC v1 24/27] afnetns: check afnetns user_ns in inet6_bind

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- net/ipv6/af_inet6.c | 40 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 30aff01eba5be0..4aa221826e753c 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/

[PATCH net-next RFC v1 08/27] afnetns: factor out inet_allow_bind

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- include/net/inet_common.h | 1 + net/ipv4/af_inet.c| 51 ++- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/include/net/inet_common.h b/include/net/inet_common.h index b7952d55b9c000..4a

[PATCH net-next RFC v1 19/27] afnetns: add afnetns support for tcpv4

2017-03-12 Thread Hannes Frederic Sowa
This commit adds the necessary checks to inet_hashtables, so that sockets also have to match the corresponding afnetns. Signed-off-by: Hannes Frederic Sowa --- include/net/inet_sock.h| 1 + net/ipv4/inet_hashtables.c | 17 +++-- net/ipv4/tcp_input.c | 3 +++ 3 files chang

[PATCH net-next RFC v1 07/27] ipv4: introduce ifa_find_rcu

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- include/linux/inetdevice.h | 1 + net/ipv4/devinet.c | 29 + 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index d5ac959e90baa1..eb1b662f62626f 1

[PATCH net-next RFC v1 17/27] afnetns: introduce __inet_select_addr

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- include/linux/inetdevice.h | 2 ++ net/ipv4/devinet.c | 27 --- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 01cbcfe93383b7..a41bfce099e0a1 100

[PATCH net-next RFC v1 20/27] ipv6: move ipv6_get_ifaddr to vmlinux in case ipv6 is build as module

2017-03-12 Thread Hannes Frederic Sowa
inet6_hashtables is build into vmlinux in case ipv6 gets build as a module. As the inet6_hashtables functions depend on ipv6_get_ifaddr via ipv6_get_ifaddr_afnetns_rcu, we need to make the lookup function always available. Signed-off-by: Hannes Frederic Sowa --- include/net/addrconf.h | 6

[PATCH net-next RFC v1 09/27] afnetns: add sock_afnetns

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- include/net/sock.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/net/sock.h b/include/net/sock.h index 1e05d497db2520..aa204bf3537ba0 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -2293,6 +2293,15 @@ struct net *sock_net

[PATCH net-next RFC v1 04/27] afnetns: add net_afnetns

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- include/net/net_namespace.h | 8 1 file changed, 8 insertions(+) diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index c59fb018da5e46..9be39b8315a6f9 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h

[PATCH net-next RFC v1 00/27] afnetns: new namespace type for separation on protocol level

2017-03-12 Thread Hannes Frederic Sowa
--- >8 --- Note: * BE CAREFUL SOURCE ADDRESS SELECTION --- >8 --- afnetns behaves like ordinary namespaces: clone, unshare, setns syscalls can work with afnetns with one limitation: one cannot cross the realm of a network namespace while changing the afnetns compartement. To get into a new afnetn

[PATCH net-next RFC v1 11/27] afnetns: validate afnetns in inet_allow_bind

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- net/ipv4/af_inet.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index aee599e23137e7..5f11399bafd16f 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -453,6 +453,17 @@ int inet_allow_bin

[PATCH net-next RFC v1 12/27] afnetns: ipv4/udp integration

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- net/ipv4/udp.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index ea6e4cff9fafe9..5bfe2d9f5583da 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -155,6 +155,7 @@ static int u

[PATCH net-next RFC v1 10/27] afnetns: add ifa_find_afnetns_rcu

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- include/linux/inetdevice.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index eb1b662f62626f..01cbcfe93383b7 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h

[PATCH net-next RFC v1 13/27] afnetns: use inet_allow_bind in inet6_bind

2017-03-12 Thread Hannes Frederic Sowa
Signed-off-by: Hannes Frederic Sowa --- net/ipv6/af_inet6.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 04db40620ea65c..f9367c507573bc 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c @@ -316,8 +3

[PATCH net-next RFC v1 01/27] afnetns: add CLONE_NEWAFNET flag

2017-03-12 Thread Hannes Frederic Sowa
This patch adds a new clone flag. It will be used if a clone should also open up a new afnetns namespace. The only restriction placed on this new flag, is, that it cannot be used together with CLONE_NEWNET. The previous usage of flag 0x1000 was used for CLONE_IDLETASK until 2004. It was only a

[PATCH net-next RFC v1 06/27] afnetns: put afnetns pointer into struct sock

2017-03-12 Thread Hannes Frederic Sowa
All sockets are associated to its creator's afnet namespace. A little bit care must be taken about in-kernel socket creation. Basically we associate kernel pointers to the current's net namespace afnet and don't use the process contexts afnetns. Signed-off-by: Hannes Frederic Sowa --- include/n

[PATCH net-next RFC v1 05/27] afnetns: ipv6 integration

2017-03-12 Thread Hannes Frederic Sowa
Like the previous IPv4 counterpart, this patch associates every IPv6 address with a corresponding afnet namespace. The namespace can be set via file descriptor and the inode gets reported during dumping. Signed-off-by: Hannes Frederic Sowa --- include/net/if_inet6.h | 3 +++ net/core/afnetns.c

[PATCH RFC iproute v1 4/4] afnetns: only show afnetns when show_details

2017-03-12 Thread Hannes Frederic Sowa
Only show afnetns details when details are requested. Signed-off-by: Hannes Frederic Sowa --- ip/ipaddress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index d954f3ea5bff40..cfb58e70e4f29f 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @

[PATCH net-next RFC v1 03/27] afnetns: prepare for integration into ipv4

2017-03-12 Thread Hannes Frederic Sowa
Each IPv4 address has an associated afnet namespace, so it is only going to be used by applications in the same afnet namespace. One can open a file descriptor and pass it to the newaddr rtnetlink functions to put an IP address into a specific afnet namespace. Dumping the addresses also returns t

[PATCH RFC iproute v1 0/4] afnetns: add support for afnetns

2017-03-12 Thread Hannes Frederic Sowa
This patchset adds support for afnetns to iproute. For more information on afnetns please look at the kernel patchset. Patches for util-linux commands, namely nsenter and unshare, is available here: Hannes Frederic Sowa (4): afnetns: add ipro

[PATCH net] dccp: fix memory leak during tear-down of unsuccessful connection request

2017-03-12 Thread Hannes Frederic Sowa
This patch fixes a memory leak, which happens if the connection request is not fulfilled between parsing the DCCP options and handling the SYN (because e.g. the backlog is full), because we forgot to free the list of ack vectors. Reported-by: Jianwen Ji Signed-off-by: Hannes Frederic Sowa --- n

[PATCH RFC iproute v1 2/4] afnetns: support for ipv4/v6 address management

2017-03-12 Thread Hannes Frederic Sowa
Support ip address add xxx.yyy.zzz.lll/kk dev eth0 afnetns Signed-off-by: Hannes Frederic Sowa --- include/libnetlink.h| 7 +++ include/linux/if_addr.h | 2 ++ include/namespace.h | 2 ++ ip/ipaddress.c | 32 ip/ipafnetns.c | 26

[PATCH RFC iproute v1 3/4] afnetns: introduce lib/afnetns.c and a name cache

2017-03-12 Thread Hannes Frederic Sowa
This patch adds a name cache for afnetns, so we don't need to scan the inodes all the same again. This speeds up address list in case of many configured afnetns and ip addresses. Signed-off-by: Hannes Frederic Sowa --- include/afnetns.h | 6 ++ include/namespace.h | 3 - ip/ipaddress.c

[PATCH net-next RFC v1 02/27] afnetns: basic namespace operations and representations

2017-03-12 Thread Hannes Frederic Sowa
This patch adds the basic afnetns operations. Specifically it implements the /proc/self/ns/afnet operations which allow to basically manage afnetns namespaces plus, clone, unshare and setns. The afnetns is tracked in the nsproxy structure for each task_struct. Signed-off-by: Hannes Frederic Sowa

[PATCH RFC iproute v1 1/4] afnetns: add iproute bits for afnetns

2017-03-12 Thread Hannes Frederic Sowa
Like ip netns, ip afnetns ... provides the basic utility features to create, delete afnet namespaces and execute commands inside afnetns. Signed-off-by: Hannes Frederic Sowa --- include/namespace.h | 5 ++ include/utils.h | 1 + ip/Makefile | 2 +- ip/ip.c | 5 +-

[PATCH net] tun: fix premature POLLOUT notification on tun devices

2017-03-12 Thread Hannes Frederic Sowa
aszlig observed failing ssh tunnels (-w) during initialization since commit cc9da6cc4f56e0 ("ipv6: addrconf: use stable address generator for ARPHRD_NONE"). We already had reports that the mentioned commit breaks Juniper VPN connections. I can't clearly say that the Juniper VPN client has the same

[PATCH] net: usb: rtl8150: use new api ethtool_{get|set}_link_ksettings

2017-03-12 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/usb/rtl8150.c | 35 --- 1

[PATCH 4/4] uapi/if_ether.h: prevent redefinition of struct ethhdr

2017-03-12 Thread Hauke Mehrtens
From: David Heidelberger Musl provides its own ethhdr struct definition. Add a guard to prevent its definition of the appropriate musl header has already been included. Signed-off-by: John Spencer Tested-by: David Heidelberger Signed-off-by: Jonas Gorski --- include/uapi/linux/if_ether.h

[PATCH 0/4] uapi glibc compat: fix musl libc compatibility

2017-03-12 Thread Hauke Mehrtens
The code from libc-compat.h depends on some glibc specific defines and causes compile problems with the musl libc. These patches remove some of the glibc dependencies. With these patches the LEDE (OpenWrt) base user space applications can be build with unmodified kernel headers and musl libc.

[PATCH 2/4] uapi glibc compat: fix build if libc defines IFF_ECHO

2017-03-12 Thread Hauke Mehrtens
musl 1.1.15 defines IFF_ECHO and the other net_device_flags options. When a user application includes linux/if.h and net/if.h the compile will fail. Activate __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO only when it is needed. This should also make this work in case glibc will add these de

[PATCH 1/4] uapi glibc compat: add libc compat code when not build for kernel

2017-03-12 Thread Hauke Mehrtens
Instead of checking if this header file is used in the glibc, check if iti is not used in kernel context, this way it will also work with other libc implementations like musl. Signed-off-by: Hauke Mehrtens --- include/uapi/linux/libc-compat.h | 8 1 file changed, 4 insertions(+), 4 dele

[PATCH 3/4] uapi glibc compat: Do not check for __USE_MISC

2017-03-12 Thread Hauke Mehrtens
__USE_MISC is glibc specific and not available in musl libc. Only do this check when glibc is used. This fixes a problem with musl libc. Signed-off-by: Hauke Mehrtens --- include/uapi/linux/libc-compat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/l

[PATCH v3] Enable tx timestamping on loopback and dummy

2017-03-12 Thread Ezequiel Lara Gomez
>From f3483202625648be728df39622360508f2fb03e1 Mon Sep 17 00:00:00 2001 From: Ezequiel Lara Gomez Date: Sat, 11 Mar 2017 20:06:54 + Subject: [PATCH v3] Enable tx timestamping on loopback and dummy This enables testing of SO_TIMESTAMPING options by targetting localhost addresses. Tested on q

[PATCH] net: usb: r8152: use new api ethtool_{get|set}_link_ksettings

2017-03-12 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/usb/r8152.c | 21 - 1 files changed,

Re: [net/bpf] 3051bf36c2 BUG: unable to handle kernel paging request at 0000a7cf

2017-03-12 Thread Borislav Petkov
On Thu, Mar 09, 2017 at 03:26:02PM -0800, Linus Torvalds wrote: > Maybe it's the lguest games with PGE that need to be removed? Btw, tglx suggested something else the other day: warn when we're changing boot_cpu_data x86_capability bits *after* alternatives have run. The reasoning behind it being

[PATCH] net: usb: catc: use new api ethtool_{get|set}_link_ksettings

2017-03-12 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/usb/catc.c | 31 ++- 1 files

[PATCH iproute2] man: add examples to ip.8

2017-03-12 Thread Alexander Alemayhu
Having some examples in the top level man page might make it a little bit easier for new users to get started. Reused some words / sentences from the existing man pages. Suggested-by: 積丹尼 Dan Jacobson Signed-off-by: Alexander Alemayhu --- This is my first man page patch, hopefully I've done ever

Re: [PATCH] Enable tx timestamping on loopback and dummy

2017-03-12 Thread Ezequiel Lara Gomez
On Sun, Mar 12, 2017 at 05:30:00PM +0100, Richard Cochran wrote: > On Sun, Mar 12, 2017 at 12:17:30AM +0100, Oliver Hartkopp wrote: > > in fact you're doing three different things here: > > > > 1. introduce tx timestamping > > 2. silently change an include: -> > > 3. fix some whitespace and empt

Re: [PATCHv2 1/4] rds: ib: drop unnecessary rdma_reject

2017-03-12 Thread santosh.shilim...@oracle.com
On 3/12/17 12:33 PM, Leon Romanovsky wrote: On Sun, Mar 12, 2017 at 04:07:55AM -0400, Zhu Yanjun wrote: When rdma_accept fails, rdma_reject is called in it. As such, it is not necessary to execute rdma_reject again. Cc: Joe Jin Cc: Junxiao Bi Acked-by: Santosh Shilimkar Signed-off-by: Zhu Ya

Re: [PATCHv2 3/4] rds: ib: add the static type to the function

2017-03-12 Thread Leon Romanovsky
On Sun, Mar 12, 2017 at 04:07:57AM -0400, Zhu Yanjun wrote: > The function rds_ib_map_fmr is used only in the ib_fmr.c > file. As such, the static type is added to limit it in this file. > > Cc: Joe Jin > Cc: Junxiao Bi > Acked-by: Santosh Shilimkar > Signed-off-by: Zhu Yanjun > --- Thanks, Re

Re: [PATCHv2 1/4] rds: ib: drop unnecessary rdma_reject

2017-03-12 Thread Leon Romanovsky
On Sun, Mar 12, 2017 at 04:07:55AM -0400, Zhu Yanjun wrote: > When rdma_accept fails, rdma_reject is called in it. As such, it is > not necessary to execute rdma_reject again. > > Cc: Joe Jin > Cc: Junxiao Bi > Acked-by: Santosh Shilimkar > Signed-off-by: Zhu Yanjun > --- > Change from v1 to v2

  1   2   >