[PATCH v2 2/2] ne: DeviceTree support.

2015-10-02 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato --- Documentation/devicetree/bindings/net/ne2000.txt | 17 + drivers/net/ethernet/8390/ne.c | 20 +++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644

[PATCH v2 1/2] ne: Add h8300 support.

2015-10-02 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato --- drivers/net/ethernet/8390/Kconfig | 2 +- drivers/net/ethernet/8390/ne.c| 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/8390/Kconfig b/drivers/net/ethernet/8390/Kconfig index

Re: [PATCH 1/2] ne: Add h8300 support.

2015-10-02 Thread Yoshinori Sato
On Mon, 28 Sep 2015 04:51:30 +0900, David Miller wrote: > > From: Yoshinori Sato > Date: Sun, 27 Sep 2015 23:19:15 +0900 > > > @@ -88,7 +88,7 @@ config MCF8390 > > config NE2000 > > tristate "NE2000/NE1000 support" > > depends on (ISA || (Q40 && m) || M32R

Re: [PATCH net-next 3/5] net: Refactor path selection in __ip_route_output_key

2015-10-02 Thread kbuild test robot
Hi David, [auto build test results on next-20151001 -- if it's inappropriate base, please ignore] config: mips-nlm_xlp_defconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod

Re: Soft lockup issue in Linux 4.1.9

2015-10-02 Thread Andre Tomt
On 01. okt. 2015 13:52, Eric Dumazet wrote: On Thu, Oct 1, 2015 at 4:43 AM, Holger Hoffstätte wrote: On 10/01/15 13:29, Eric Dumazet wrote: commit 83fccfc3940c4a2db90fd7e7079f5b465cd8c6af Author: Eric Dumazet Date: Thu Aug 13

Re: [PATCH net-next v2 4/4] openvswitch: IPv6 support for ovs_tunnel_get_egress_info

2015-10-02 Thread Jiri Benc
On Thu, 1 Oct 2015 17:11:56 -0700, Pravin Shelar wrote: > I dont see point of adding this code when IPv6 sampling not support by > the patch series. It was requested by Jesse: http://article.gmane.org/gmane.linux.network/380348 I don't mind leaving this and the previous patch out, it's actually

[PATCH v1 2/5] asix: Tidy-up 32-bit header word synchronisation

2015-10-02 Thread Dean Jenkins
Tidy-up the Data header 32-bit word synchronisation logic in asix_rx_fixup_internal() by removing redundant logic tests. The code is looking at the following cases of the Data header 32-bit word that is present before each Ethernet frame: a) all 32 bits of the Data header word are in the URB

[PATCH v1 5/5] asix: Continue processing URB if no RX netdev buffer

2015-10-02 Thread Dean Jenkins
Avoid a loss of synchronisation of the Ethernet Data header 32-bit word due to a failure to get a netdev socket buffer. The ASIX RX handling algorithm returned 0 upon a failure to get an allocation of a netdev socket buffer. This causes the URB processing to stop which potentially causes a loss

[PATCH v1 4/5] asix: On RX avoid creating bad Ethernet frames

2015-10-02 Thread Dean Jenkins
When RX Ethernet frames span multiple URB socket buffers, the data stream may suffer a discontinuity which will cause the current Ethernet frame in the netdev socket buffer to be incomplete. This frame needs to be discarded instead of appending unrelated data from the current URB socket buffer to

[PATCH v2 0/5] Improve ASIX RX memory allocation error handling

2015-10-02 Thread Dean Jenkins
From: Mark Craske The ASIX RX handler algorithm is weak on error handling. There is a design flaw in the ASIX RX handler algorithm because the implementation for handling RX Ethernet frames for the DUB-E100 C1 can have Ethernet frames spanning multiple URBs. This means

[PATCH net-next 3/4] bridge: vlan: drop master_flags from __vlan_add

2015-10-02 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov There's only one user now and we can include the flag directly. Signed-off-by: Nikolay Aleksandrov --- net/bridge/br_vlan.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH net-next 1/4] bridge: vlan: use rcu list for the ordered vlan list

2015-10-02 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov When I did the conversion to rhashtable I missed the required locking of one important user of the vlan list - br_get_link_af_size_filtered() which is called: br_ifinfo_notify() -> br_nlmsg_size() -> br_get_link_af_size_filtered() and the

Re: [PATCH RFC 3/7] netfilter: add NF_INET_LOCAL_SOCKET_IN chain type

2015-10-02 Thread Daniel Mack
On 10/02/2015 01:07 PM, Pablo Neira Ayuso wrote: > On Thu, Oct 01, 2015 at 11:07:30PM +0200, Daniel Mack wrote: > [...] >> That, however, got rejected because it doesn't work for multicast. This >> patch set implements one of the things Pablo suggested in his reply. > > People are rising valid

Re: [PATCH 1/3] net: dsa: Use devm_ prefixed allocations

2015-10-02 Thread Sergei Shtylyov
On 10/2/2015 1:48 PM, Neil Armstrong wrote: To simplify and prevent memory leakage when unbinding, use the devm_ memory allocation calls. Tested-by: Andrew Lunn Tested-by: Florian Fainelli Signed-off-by: Neil Armstrong ---

Re: [PATCH 1/3] net: dsa: Use devm_ prefixed allocations

2015-10-02 Thread Neil Armstrong
On 10/02/2015 03:29 PM, Sergei Shtylyov wrote: > On 10/2/2015 1:48 PM, Neil Armstrong wrote: > >> To simplify and prevent memory leakage when unbinding, use >> the devm_ memory allocation calls. >> >> Tested-by: Andrew Lunn >> Tested-by: Florian Fainelli >>

[PATCH v1 1/5] asix: Rename remaining and size for clarity

2015-10-02 Thread Dean Jenkins
The Data header synchronisation is easier to understand if the variables "remaining" and "size" are renamed. Therefore, the lifetime of the "remaining" variable exists outside of asix_rx_fixup_internal() and is used to indicate any remaining pending bytes of the Ethernet frame that need to be

[PATCH v1 3/5] asix: Simplify asix_rx_fixup_internal() netdev alloc

2015-10-02 Thread Dean Jenkins
The code is checking that the Ethernet frame will fit into a netdev allocated socket buffer within the constraints of MTU size, Ethernet header length plus VLAN header length. The original code was checking rx->remaining each loop of the while loop that processes multiple Ethernet frames per URB

Re: [PATCH 1/3] net: dsa: Use devm_ prefixed allocations

2015-10-02 Thread Sergei Shtylyov
On 10/2/2015 4:30 PM, Neil Armstrong wrote: To simplify and prevent memory leakage when unbinding, use the devm_ memory allocation calls. Tested-by: Andrew Lunn Tested-by: Florian Fainelli Signed-off-by: Neil Armstrong ---

[PATCH net] ARM: net: make BPF_LD | BPF_IND instruction trigger r_X initialisation to 0.

2015-10-02 Thread Nicolas Schichan
Without this patch, if the only instructions using r_X are of the BPF_LD | BPF_IND type, r_X would not be reset to 0, using whatever value was there when entering the jited code. With this patch, r_X will be correctly marked as used so it will be reset to 0 in the prologue code. This fix also

[PATCH net-next] ARM: net: support BPF_ALU | BPF_MOD instructions in the BPF JIT.

2015-10-02 Thread Nicolas Schichan
For ARMv7 with UDIV instruction support, generate an UDIV instruction followed by an MLS instruction. For other ARM variants, generate code calling a C wrapper similar to the jit_udiv() function used for BPF_ALU | BPF_DIV instructions. Some performance numbers reported by the test_bpf module

[PATCH net-next 0/4] bridge: vlan: cleanups & fixes (part 2)

2015-10-02 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Hi, This is the second follow-up set with one fix (patch 01) and more cleanups (patches 02,03 and 04). These are minor compared to the previous ones and should be the last before taking on the optimization changes on the fast-path. Cheers,

[PATCH net-next 2/4] bridge: vlan: use br_vlan_(get|put)_master to deal with refcounts

2015-10-02 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov Introduce br_vlan_(get|put)_master which take a reference (or create the master vlan first if it didn't exist) and drop a reference respectively. Signed-off-by: Nikolay Aleksandrov --- There's one slightly

[PATCH net-next 4/4] bridge: vlan: use br_vlan_should_use to simplify __vlan_add/del

2015-10-02 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov The checks that lead to num_vlans change are always what br_vlan_should_use checks for, namely if the vlan is only a context or not and depending on that it's either not counted or counted as a real/used vlan respectively. Also give better

[PATCH net-next] bpf, seccomp: prepare for upcoming criu support

2015-10-02 Thread Daniel Borkmann
The current ongoing effort to dump existing cBPF seccomp filters back to user space requires to hold the pre-transformed instructions like we do in case of socket filters from sk_attach_filter() side, so they can be reloaded in original form at a later point in time by utilities such as criu. To

[PATCH v1 0/5] Improve ASIX RX memory allocation error handling

2015-10-02 Thread Dean Jenkins
From: Mark Craske Please ignore the cover letter PATCH v2 as sent in error. Patches are all v1, (there are no v2 patches yet) The ASIX RX handler algorithm is weak on error handling. There is a design flaw in the ASIX RX handler algorithm because the implementation for

Re: [MM PATCH V4.1 5/6] slub: support for bulk free with SLUB freelists

2015-10-02 Thread Jesper Dangaard Brouer
On Fri, 2 Oct 2015 11:41:18 +0200 Jesper Dangaard Brouer wrote: > On Thu, 1 Oct 2015 15:10:15 -0700 > Andrew Morton wrote: > > > On Wed, 30 Sep 2015 13:44:19 +0200 Jesper Dangaard Brouer > > wrote: > > > > > Make it possible

Re: [PATCH 08/12] nfnetlink: use y2038 safe timestamp

2015-10-02 Thread Pablo Neira Ayuso
On Wed, Sep 30, 2015 at 01:26:38PM +0200, Arnd Bergmann wrote: > The __build_packet_message function fills a nfulnl_msg_packet_timestamp > structure that uses 64-bit seconds and is therefore y2038 safe, but > it uses an intermediate 'struct timespec' which is not. > > This trivially changes the

Re: [PATCH 1/3] net: dsa: Use devm_ prefixed allocations

2015-10-02 Thread Felix Fietkau
On 2015-10-02 12:48, Neil Armstrong wrote: > To simplify and prevent memory leakage when unbinding, use > the devm_ memory allocation calls. > > Tested-by: Andrew Lunn > Tested-by: Florian Fainelli > Signed-off-by: Neil Armstrong I

Re: netpoll_send_skb_on_dev warning with bnx2

2015-10-02 Thread Neil Horman
On Thu, Oct 01, 2015 at 08:25:46PM -0700, Vinson Lee wrote: > Hi. > > I am seeing a netpoll_send_skb_on_dev warning with bnx2. It happens on > Linux 4.1 and I am able to reproduce the warning with Linux 4.3-rc3. > > [ cut here ] > WARNING: CPU: 11 PID: 3110 at

[PATCH net] bpf: fix panic in SO_GET_FILTER with native ebpf programs

2015-10-02 Thread Daniel Borkmann
When sockets have a native eBPF program attached through setsockopt(sk, SOL_SOCKET, SO_ATTACH_BPF, ...), and then try to dump these over getsockopt(sk, SOL_SOCKET, SO_GET_FILTER, ...), the following panic appears: [49904.178642] BUG: unable to handle kernel NULL pointer dereference at (null)

[PATCH 3/3] net: dsa: exit probe if no switch were found

2015-10-02 Thread Neil Armstrong
If no switch were found in dsa_setup_dst, return -ENODEV and exit the dsa_probe cleanly. Tested-by: Andrew Lunn Tested-by: Florian Fainelli Signed-off-by: Neil Armstrong --- net/dsa/dsa.c | 19 +++ 1 file changed,

Re: [PATCH] net/unix: fix logic about sk_peek_offset

2015-10-02 Thread Aaron Conole
Andrey Vagin writes: > 2015-10-02 0:05 GMT+03:00 Andrey Vagin : >> From: Andrey Vagin >> >> Now send with MSG_PEEK can return data from multiple SKBs. >> >> Unfortunately we take into account the peek offset for each skb, >> that is wrong.

Re: [PATCH net-next 3/3] r8169: support IPv6

2015-10-02 Thread David Woodhouse
> Support the IPv6 hw checksum for RTL8111C and later chips. Note > that the hw has the limitation for the transport offset. The > checksum must be calculated by sw, when the transport offset is > out of the range which the hw accepts. It would be better to implement this check in a

Re: [PATCH] net/unix: fix logic about sk_peek_offset

2015-10-02 Thread Andrey Vagin
2015-10-02 0:05 GMT+03:00 Andrey Vagin : > From: Andrey Vagin > > Now send with MSG_PEEK can return data from multiple SKBs. > > Unfortunately we take into account the peek offset for each skb, > that is wrong. We need to apply the peek offset only once. > >

[PATCH 1/3] net: dsa: Use devm_ prefixed allocations

2015-10-02 Thread Neil Armstrong
To simplify and prevent memory leakage when unbinding, use the devm_ memory allocation calls. Tested-by: Andrew Lunn Tested-by: Florian Fainelli Signed-off-by: Neil Armstrong --- net/dsa/dsa.c | 6 +++--- 1 file changed, 3

[PATCH 2/3] net: dsa: complete dsa_switch_destroy calls

2015-10-02 Thread Neil Armstrong
When unbinding dsa, complete the dsa_switch_destroy to cleanly destroy and unregister the net and mdio devices. Tested-by: Andrew Lunn Tested-by: Florian Fainelli Signed-off-by: Neil Armstrong --- net/dsa/dsa.c | 42

[PATCH 0/3] net: dsa: Complete and fix the dsa unbinding

2015-10-02 Thread Neil Armstrong
In order to cleanly unbind the dsa core, either as a module removal, or a platform device unbind, switch the allocation the their devm_ counterparts and complete the destroy functions. The last patch is an experimental way to exit the probe when no switch is found in the discover process. The

[PATCH] ovs: do not allocate memory from offline numa node

2015-10-02 Thread Konstantin Khlebnikov
When openvswitch tries allocate memory from offline numa node 0: stats = kmem_cache_alloc_node(flow_stats_cache, GFP_KERNEL | __GFP_ZERO, 0) It catches VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES || !node_online(nid)) [ replaced with VM_WARN_ON(!node_online(nid)) recently ] in linux/gfp.h This patch

Re: [PATCH nf-next] netfilter: Line layout whitespace fixes

2015-10-02 Thread Pablo Neira Ayuso
On Fri, Oct 02, 2015 at 12:44:03AM +0100, Ian Morris wrote: > > On 30/09/15 23:17, Pablo Neira Ayuso wrote: > >On Thu, Sep 24, 2015 at 11:10:06AM +0100, Ian Morris wrote: > >>Fixes various whitespace issues detected by checkpatch (e.g. adding spaces > >>between operations, replacing spaces with

Re: [PATCH RFC 3/7] netfilter: add NF_INET_LOCAL_SOCKET_IN chain type

2015-10-02 Thread Pablo Neira Ayuso
On Thu, Oct 01, 2015 at 11:07:30PM +0200, Daniel Mack wrote: [...] > That, however, got rejected because it doesn't work for multicast. This > patch set implements one of the things Pablo suggested in his reply. People are rising valid concerns here, so far we got a RFC where you say that you

[PATCH iproute2] tipc: add man pages

2015-10-02 Thread richard.alpe
From: Richard Alpe This patch adds man pages for the TIPC tool. There is one main page and one page for each top level sub-command. These pages mainly aims to help a user of the tipc tool. In addition to this they describe a bit about what TIPC is and some of its

RE: [v3 1/8] devres: add devm_alloc_percpu()

2015-10-02 Thread Madalin-Cristian Bucur
> -Original Message- > From: Wood Scott-B07421 > Sent: Friday, October 02, 2015 4:01 AM > > On Thu, Sep 24, 2015 at 06:00:12PM +0300, Madalin Bucur wrote: > > Introduce managed counterparts for alloc_percpu() and free_percpu(). > > Add devm_alloc_percpu() and devm_free_percpu() into the

[PATCH 1/1] i40e: re-use %*ph specifier to hexdump a data

2015-10-02 Thread Andy Shevchenko
Instead of using a custom approach change the code to use %*ph format specifier. Signed-off-by: Andy Shevchenko --- drivers/net/ethernet/intel/i40e/i40e_common.c | 22 -- drivers/net/ethernet/intel/i40evf/i40e_common.c | 22

Re: [PATCH net] net: add pfmemalloc check in sk_add_backlog()

2015-10-02 Thread Eric Dumazet
On Tue, 2015-09-29 at 21:56 -0700, David Miller wrote: > From: Eric Dumazet > Date: Tue, 29 Sep 2015 18:52:25 -0700 > > > From: Eric Dumazet > > > > Greg reported crashes hitting the following check in __sk_backlog_rcv() > > > >

[PATCH iproute2] batch: support quoted strings

2015-10-02 Thread Christophe Gouault
Support quoting strings with " or ' in an iproute2 batch file. Enables to configure empty crypto keys (for ESP-null) or keys with spaces: xfrm state add src 1.1.1.1 dst 2.2.2.2 proto ah spi 0x1 \ mode tunnel auth hmac(sha1) "r4ezR/@kd6'749f2 6zf$" xfrm state add src 5.5.5.5 dst

Re: [RFC PATCH 3/3] net: dsa: exit probe if no switch were found

2015-10-02 Thread Neil Armstrong
On 10/01/2015 06:32 PM, Andrew Lunn wrote: > On Thu, Oct 01, 2015 at 05:27:32PM +0200, Neil Armstrong wrote: >> On 09/30/2015 10:21 AM, Neil Armstrong wrote: >>> If no switch were found in dsa_setup_dst, return -ENODEV and >>> exit the dsa_probe cleanly. > > ... > >> Couldn't we use the probe

Re: [MM PATCH V4.1 5/6] slub: support for bulk free with SLUB freelists

2015-10-02 Thread Christoph Lameter
On Fri, 2 Oct 2015, Jesper Dangaard Brouer wrote: > Thus, I need introducing new code like this patch and at the same time > have to reduce the number of instruction-cache misses/usage. In this > case we solve the problem by kmem_cache_free_bulk() not getting called > too often. Thus, +17 bytes

Re: [MM PATCH V4.1 5/6] slub: support for bulk free with SLUB freelists

2015-10-02 Thread Jesper Dangaard Brouer
On Fri, 2 Oct 2015 05:10:02 -0500 (CDT) Christoph Lameter wrote: > On Fri, 2 Oct 2015, Jesper Dangaard Brouer wrote: > > > Thus, I need introducing new code like this patch and at the same time > > have to reduce the number of instruction-cache misses/usage. In this > > case we

Re: [MM PATCH V4.1 5/6] slub: support for bulk free with SLUB freelists

2015-10-02 Thread Jesper Dangaard Brouer
On Thu, 1 Oct 2015 15:10:15 -0700 Andrew Morton wrote: > On Wed, 30 Sep 2015 13:44:19 +0200 Jesper Dangaard Brouer > wrote: > > > Make it possible to free a freelist with several objects by adjusting > > API of slab_free() and __slab_free() to

Re: [PATCH 0/3] net: dsa: Complete and fix the dsa unbinding

2015-10-02 Thread Neil Armstrong
On 10/02/2015 12:47 PM, Neil Armstrong wrote: > In order to cleanly unbind the dsa core, either as a module removal, > or a platform device unbind, switch the allocation the their devm_ > counterparts and complete the destroy functions. > > The last patch is an experimental way to exit the probe

Re: [PATCH net] bpf: fix panic in SO_GET_FILTER with native ebpf programs

2015-10-02 Thread Alexei Starovoitov
On 10/2/15 3:06 AM, Daniel Borkmann wrote: However, sk_get_filter() wasn't updated to test for this at the time when eBPF could be attached. Just throw an error to the user to indicate that eBPF cannot be dumped over this interface. That way, it can also be known that a program_is_ attached (as

Re: [PATCH net-next] bpf, seccomp: prepare for upcoming criu support

2015-10-02 Thread Daniel Borkmann
On 10/02/2015 05:09 PM, Alexei Starovoitov wrote: ... I agree that adding flag to bpf_prog_create_from_user() is cleaner than exposing static bpf_prog_store_orig_filter(), so There's also another reason as mentioned, i.e. that the progs are ro-locked, so doing bpf_prog_store_orig_filter()

v5 of seccomp filter c/r patches

2015-10-02 Thread Tycho Andersen
Hi all, Here's v5 of the seccomp filter c/r set. The individual patch notes have changes, but two highlights are: * This series is now based on http://patchwork.ozlabs.org/patch/525492/ and will need to be built with that patch applied. This gets rid of two incorrect patches in the previous

[PATCH v5 1/3] seccomp: add the concept of a seccomp filter FD

2015-10-02 Thread Tycho Andersen
This patch introduces the concept of a seccomp fd, with a similar interface and usage to ebpf fds. Initially, one is allowed to create, install, and dump these fds. Any manipulation of seccomp fds requires users to be root in their own user namespace, matching the checks done for

[PATCH v5 3/3] kcmp: add KCMP_SECCOMP_FD

2015-10-02 Thread Tycho Andersen
This command allows for comparing the filters pointed to by two seccomp fds. This is useful e.g. to find out if a seccomp filter is inherited, since struct seccomp_filter are unique across tasks and are the private_data seccomp fds. v2: switch to KCMP_SECCOMP_FD instead of KCMP_FILE_PRIVATE_DATA

Re: [PATCH net-next] ARM: net: support BPF_ALU | BPF_MOD instructions in the BPF JIT.

2015-10-02 Thread Russell King - ARM Linux
On Fri, Oct 02, 2015 at 04:37:51PM +0200, Nicolas Schichan wrote: > @@ -125,7 +125,7 @@ static u64 jit_get_skb_w(struct sk_buff *skb, int offset) > } > > /* > - * Wrapper that handles both OABI and EABI and assures Thumb2 interworking > + * Wrappers that handles both OABI and EABI and assures

Re: [PATCH net-next V2] ARM: net: support BPF_ALU | BPF_MOD instructions in the BPF JIT.

2015-10-02 Thread Alexei Starovoitov
On Fri, Oct 02, 2015 at 05:06:47PM +0200, Nicolas Schichan wrote: > For ARMv7 with UDIV instruction support, generate an UDIV instruction > followed by an MLS instruction. > > For other ARM variants, generate code calling a C wrapper similar to > the jit_udiv() function used for BPF_ALU | BPF_DIV

[PATCH v5 2/3] seccomp: add a ptrace command to get seccomp filter fds

2015-10-02 Thread Tycho Andersen
I just picked 40 for the constant out of thin air, but there may be a more appropriate value for this. Also, we return EINVAL when there is no filter for the index the user requested, but ptrace also returns EINVAL for invalid commands, making it slightly awkward to test whether or not the kernel

[PATCH net-next V2] ARM: net: support BPF_ALU | BPF_MOD instructions in the BPF JIT.

2015-10-02 Thread Nicolas Schichan
For ARMv7 with UDIV instruction support, generate an UDIV instruction followed by an MLS instruction. For other ARM variants, generate code calling a C wrapper similar to the jit_udiv() function used for BPF_ALU | BPF_DIV instructions. Some performance numbers reported by the test_bpf module

Re: [PATCH net-next] bpf, seccomp: prepare for upcoming criu support

2015-10-02 Thread Daniel Borkmann
On 10/02/2015 05:06 PM, Tycho Andersen wrote: ... Cc: Pavel Emelyanov Cc: Kees Cook Cc: Andy Lutomirski Cc: Alexei Starovoitov --- This is in realtion to Tycho's latest patch set under [1]. The BPF

Re: [PATCH net-next] bpf, seccomp: prepare for upcoming criu support

2015-10-02 Thread Alexei Starovoitov
On 10/2/15 6:17 AM, Daniel Borkmann wrote: The current ongoing effort to dump existing cBPF seccomp filters back to user space requires to hold the pre-transformed instructions like we do in case of socket filters from sk_attach_filter() side, so they can be reloaded in original form at a later

Re: [PATCH net-next] bpf, seccomp: prepare for upcoming criu support

2015-10-02 Thread Tycho Andersen
Hi Daniel, On Fri, Oct 02, 2015 at 03:17:33PM +0200, Daniel Borkmann wrote: > The current ongoing effort to dump existing cBPF seccomp filters back > to user space requires to hold the pre-transformed instructions like > we do in case of socket filters from sk_attach_filter() side, so they > can

Re: [PATCH net] fib_rules: fix fib rule dumps across multiple skbs

2015-10-02 Thread Roland Dreier
On Tue, Sep 22, 2015 at 9:40 PM, Roopa Prabhu wrote: > + err = fib_nl_fill_rule(skb, rule, NETLINK_CB(cb->skb).portid, > + cb->nlh->nlmsg_seq, RTM_NEWRULE, > + NLM_F_MULTI, ops); > +

Re: [PATCH net] fib_rules: fix fib rule dumps across multiple skbs

2015-10-02 Thread roopa
On 10/2/15, 10:18 AM, Roland Dreier wrote: > On Tue, Sep 22, 2015 at 9:40 PM, Roopa Prabhu > wrote: >> + err = fib_nl_fill_rule(skb, rule, NETLINK_CB(cb->skb).portid, >> + cb->nlh->nlmsg_seq, RTM_NEWRULE, >> +

[PATCH net-next 00/17] tcp/dccp: lockless listener

2015-10-02 Thread Eric Dumazet
TCP listener refactoring : this is becoming interesting ! This patch series takes the steps to use normal TCP/DCCP ehash table to store SYN_RECV requests, instead of the private per-listener hash table we had until now. SYNACK skb are now attached to their syn_recv request socket, so that we no

[PATCH net-next 03/17] tcp: move synflood_warned into struct request_sock_queue

2015-10-02 Thread Eric Dumazet
long term plan is to remove struct listen_sock when its hash table is no longer there. Signed-off-by: Eric Dumazet --- include/net/request_sock.h | 2 +- net/ipv4/tcp_input.c | 7 +++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git

[PATCH net-next 15/17] tcp: remove max_qlen_log

2015-10-02 Thread Eric Dumazet
This control variable was set at first listen(fd, backlog) call, but not updated if application tried to increase or decrease backlog. It made sense at the time listener had a non resizeable hash table. Also rounding to powers of two was not very friendly. Signed-off-by: Eric Dumazet

[PATCH net-next 13/17] tcp: attach SYNACK messages to request sockets instead of listener

2015-10-02 Thread Eric Dumazet
If a listen backlog is very big (to avoid syncookies), then the listener sk->sk_wmem_alloc is the main source of false sharing, as we need to touch it twice per SYNACK re-transmit and TX completion. (One SYN packet takes listener lock once, but up to 6 SYNACK are generated) By attaching the skb

[PATCH net-next 14/17] tcp/dccp: remove struct listen_sock

2015-10-02 Thread Eric Dumazet
It is enough to check listener sk_state, no need for an extra condition. max_qlen_log can be moved into struct request_sock_queue We can remove syn_wait_lock and the alignment it enforced. Signed-off-by: Eric Dumazet --- include/net/request_sock.h | 26

[PATCH net-next] ebpf: include perf_event only where really needed

2015-10-02 Thread Daniel Borkmann
Commit ea317b267e9d ("bpf: Add new bpf map type to store the pointer to struct perf_event") added perf_event.h to the main eBPF header, so it gets included for all users. perf_event.h is actually only needed from array map side, so lets sanitize this a bit. Signed-off-by: Daniel Borkmann

Re: [PATCH net-next v2] net: Add support for filtering neigh dump by master device

2015-10-02 Thread Eric W. Biederman
David Ahern writes: > Add support for filtering neighbor dumps by master device by adding > the NDA_MASTER attribute to the dump request. A new netlink flag, > NLM_F_DUMP_FILTERED, is added to indicate the kernel supports the > request and output is filtered as

Re: [PATCH net-next V14 0/3] openvswitch: Add support for 802.1ad

2015-10-02 Thread Pravin Shelar
On Wed, Sep 30, 2015 at 8:32 PM, Thomas F Herbert wrote: > Although the Open Flow specification specified support for 802.1AD (qinq) > as well as push and pop vlan headers, So far Open vSwitch has only > supported a single tag header. This patch implements 802.1AD in

[PATCH] ip neigh: Add support for filtering dumps by master device

2015-10-02 Thread David Ahern
Add support for filtering neighbor dumps by master device. Kernel side support provided by commit 21fdd092acc7. Since the feature is not available in older kernels the user is given a warning message if the kernel does not support the request. Signed-off-by: David Ahern

[PATCH net-next 12/17] ipv6: remove obsolete inet6 functions

2015-10-02 Thread Eric Dumazet
inet6_csk_search_req() and inet6_csk_reqsk_queue_hash_add() no longer exist. Signed-off-by: Eric Dumazet --- include/net/inet6_connection_sock.h | 9 - 1 file changed, 9 deletions(-) diff --git a/include/net/inet6_connection_sock.h

Re: [PATCH net-next] ebpf: include perf_event only where really needed

2015-10-02 Thread Alexei Starovoitov
On 10/2/15 9:42 AM, Daniel Borkmann wrote: Commit ea317b267e9d ("bpf: Add new bpf map type to store the pointer to struct perf_event") added perf_event.h to the main eBPF header, so it gets included for all users. perf_event.h is actually only needed from array map side, so lets sanitize this a

Re: [PATCH 1/2] regmap: Allow installing custom reg_update_bits function

2015-10-02 Thread Mark Brown
On Thu, Oct 01, 2015 at 08:29:19AM -0400, Jon Ringle wrote: > On Thu, 1 Oct 2015, Mark Brown wrote: > > This completely bypasses and therefore breaks the cache infrastructure. > Right after sending the v2 patch, I realized that calling the > custom reg_update_bits would only be applicable for

Re: [RFC PATCH 3/3] net: dsa: exit probe if no switch were found

2015-10-02 Thread Florian Fainelli
On 02/10/15 05:10, Neil Armstrong wrote: > On 10/01/2015 06:32 PM, Andrew Lunn wrote: >> On Thu, Oct 01, 2015 at 05:27:32PM +0200, Neil Armstrong wrote: >>> On 09/30/2015 10:21 AM, Neil Armstrong wrote: If no switch were found in dsa_setup_dst, return -ENODEV and exit the dsa_probe

Re: [PATCH net] ppp: don't override sk->sk_state in pppoe_flush_dev()

2015-10-02 Thread Guillaume Nault
On Fri, Oct 02, 2015 at 11:01:45AM +0300, Denys Fedoryshchenko wrote: > Here is similar panic after patch applied (it might be different bug), got > over netconsole: > > [126348.617115] CPU: 0 PID: 5254 Comm: accel-pppd Not tainted > 4.2.2-build-0087 #2 > [126348.617632] Hardware name: Intel

[PATCH net-next 01/17] tcp: add a spinlock to protect struct request_sock_queue

2015-10-02 Thread Eric Dumazet
struct request_sock_queue fields are currently protected by the listener 'lock' (not a real spinlock) We need to add a private spinlock instead, so that softirq handlers creating children do not have to worry with backlog notion that the listener 'lock' carries. Signed-off-by: Eric Dumazet

[PATCH net-next 17/17] tcp: do not lock listener to process SYN packets

2015-10-02 Thread Eric Dumazet
Everything should now be ready to finally allow SYN packets processing without holding listener lock. Tested: 3.5 Mpps SYNFLOOD. Plenty of cpu cycles available. Next bottleneck is the refcount taken on listener, that could be avoided if we remove SLAB_DESTROY_BY_RCU strict semantic for

[PATCH net-next 16/17] tcp/dccp: add a reschedule point in inet_csk_listen_stop()

2015-10-02 Thread Eric Dumazet
If a listener with thousands of children in accept queue is dismantled, it can take a while to close all of them. Signed-off-by: Eric Dumazet --- net/ipv4/inet_connection_sock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv4/inet_connection_sock.c

[PATCH] unix: fix use-after-free with unix_dgram_poll()

2015-10-02 Thread Jason Baron
From: Jason Baron The unix_dgram_poll() routine calls sock_poll_wait() not only for the wait queue associated with the socket s that we've called poll() on, but it also calls sock_poll_wait() for a remote peer socket's wait queue, if it's connected. Thus, if we call

Re: [PATCH net-next v2 4/4] openvswitch: IPv6 support for ovs_tunnel_get_egress_info

2015-10-02 Thread Pravin Shelar
On Thu, Oct 1, 2015 at 11:00 PM, Jiri Benc wrote: > On Thu, 1 Oct 2015 17:11:56 -0700, Pravin Shelar wrote: >> I dont see point of adding this code when IPv6 sampling not support by >> the patch series. > > It was requested by Jesse: >

Re: [PATCH] unix: fix use-after-free with unix_dgram_poll()

2015-10-02 Thread Rainer Weikusat
Rainer Weikusat writes: > Jason Baron writes: >> From: Jason Baron >> >> The unix_dgram_poll() routine calls sock_poll_wait() not only for the wait >> queue associated with the socket s that we've called poll() on,

Re: [PATCH] unix: fix use-after-free with unix_dgram_poll()

2015-10-02 Thread Rainer Weikusat
Jason Baron writes: > On 10/02/2015 03:30 PM, Rainer Weikusat wrote: >> Jason Baron writes: >>> From: Jason Baron >>> >>> The unix_dgram_poll() routine calls sock_poll_wait() not only for the wait >>> queue associated with the socket s

[PATCH net-next 10/17] tcp/dccp: install syn_recv requests into ehash table

2015-10-02 Thread Eric Dumazet
In this patch, we insert request sockets into TCP/DCCP regular ehash table (where ESTABLISHED and TIMEWAIT sockets are) instead of using the per listener hash table. ACK packets find SYN_RECV pseudo sockets without having to find and lock the listener. In nominal conditions, this halves pressure

Re: Soft lockup issue in Linux 4.1.9

2015-10-02 Thread Wolfgang Walter
Am Freitag, 2. Oktober 2015, 09:17:16 schrieb Holger Hoffstätte: > On 10/02/15 08:52, Andre Tomt wrote: > > On 01. okt. 2015 13:52, Eric Dumazet wrote: > >> On Thu, Oct 1, 2015 at 4:43 AM, Holger Hoffstätte > >> > >> wrote: > >>> On 10/01/15 13:29, Eric Dumazet

Re: [PATCH] unix: fix use-after-free with unix_dgram_poll()

2015-10-02 Thread Rainer Weikusat
Jason Baron writes: > From: Jason Baron > > The unix_dgram_poll() routine calls sock_poll_wait() not only for the wait > queue associated with the socket s that we've called poll() on, but it also > calls sock_poll_wait() for a remote peer socket's wait

[PATCH net-next 06/17] tcp: cleanup tcp_v[46]_inbound_md5_hash()

2015-10-02 Thread Eric Dumazet
We'll soon have to call tcp_v[46]_inbound_md5_hash() twice. Also add const attribute to the socket, as it might be the unlocked listener for SYN packets. Signed-off-by: Eric Dumazet --- net/ipv4/tcp_ipv4.c | 16 ++-- net/ipv6/tcp_ipv6.c | 10 ++ 2 files

[PATCH net-next 11/17] tcp/dccp: shrink struct listen_sock

2015-10-02 Thread Eric Dumazet
We no longer use hash_rnd, nr_table_entries and syn_table[] For a listener with a backlog of 10 millions sockets, this saves 80 MBytes of vmalloced memory. Signed-off-by: Eric Dumazet --- include/net/request_sock.h | 3 --- net/core/request_sock.c| 14 +++---

Re: [PATCH] unix: fix use-after-free with unix_dgram_poll()

2015-10-02 Thread Jason Baron
On 10/02/2015 03:30 PM, Rainer Weikusat wrote: > Jason Baron writes: >> From: Jason Baron >> >> The unix_dgram_poll() routine calls sock_poll_wait() not only for the wait >> queue associated with the socket s that we've called poll() on, but it also >> calls

Re: [PATCH net-next v2] net: Add support for filtering neigh dump by master device

2015-10-02 Thread David Ahern
On 10/2/15 11:18 AM, Eric W. Biederman wrote: What is the thinking here because it sure looks like you are busily adding layer two functionality you swore you did not want. Interfaces are enslaved to a VRF device, but neighbor entries are installed with a reference to the actual interface not

Re: Soft lockup issue in Linux 4.1.9

2015-10-02 Thread Thomas Gleixner
On Thu, 1 Oct 2015, Eric Dumazet wrote: > On Thu, Oct 1, 2015 at 4:43 AM, Holger Hoffstätte > wrote: > > On 10/01/15 13:29, Eric Dumazet wrote: > > >> commit 83fccfc3940c4a2db90fd7e7079f5b465cd8c6af > >> Author: Eric Dumazet > >> Date:

[PATCH net-next 08/17] tcp: get_openreq[46]() changes

2015-10-02 Thread Eric Dumazet
When request sockets are no longer in a per listener hash table but on regular TCP ehash, we need to access listener uid through req->rsk_listener get_openreq6() also gets a const for its request socket argument. Signed-off-by: Eric Dumazet --- include/net/tcp.h | 1 -

[PATCH net-next 07/17] tcp: remove BUG_ON() in tcp_check_req()

2015-10-02 Thread Eric Dumazet
Once listener is lockless, its sk_state can change anytime. Signed-off-by: Eric Dumazet --- net/ipv4/tcp_minisocks.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 897e34273ba3..9adf1e2c3170 100644 ---

[PATCH net-next 02/17] tcp: move qlen/young out of struct listen_sock

2015-10-02 Thread Eric Dumazet
qlen_inc & young_inc were protected by listener lock, while qlen_dec & young_dec were atomic fields. Everything needs to be atomic for upcoming lockless listener. Also move qlen/young in request_sock_queue as we'll get rid of struct listen_sock eventually. Signed-off-by: Eric Dumazet

[PATCH net-next 05/17] tcp/dccp: init sk_prot and call sk_node_init() in reqsk_alloc()

2015-10-02 Thread Eric Dumazet
We plan to use generic functions to insert request sockets into ehash table. sk_prot needs to be set (to retrieve sk_prot->h.hashinfo) sk_node needs to be cleared. Signed-off-by: Eric Dumazet --- include/net/request_sock.h | 22 -- 1 file changed, 12

[PATCH net-next 09/17] tcp/dccp: remove inet_csk_reqsk_queue_added() timeout argument

2015-10-02 Thread Eric Dumazet
This is no longer used. Signed-off-by: Eric Dumazet --- include/net/inet_connection_sock.h | 3 +-- net/ipv4/inet_connection_sock.c| 2 +- net/ipv6/inet6_connection_sock.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH net-next 04/17] tcp: call sk_mark_napi_id() on the child, not the listener

2015-10-02 Thread Eric Dumazet
This fixes a typo : We want to store the NAPI id on child socket. Presumably nobody really uses busy polling, on short lived flows. Fixes: 3d97379a67486 ("tcp: move sk_mark_napi_id() at the right place") Signed-off-by: Eric Dumazet --- net/ipv4/tcp_ipv4.c | 2 +-

[PATCH v2 0/3] af_unix: fix use-after-free

2015-10-02 Thread Jason Baron
Hi, These patches are against mainline, I can re-base to net-next, just let me know. They have been tested against: https://lkml.org/lkml/2015/9/13/195, which causes the use-after-free quite quickly and here: https://lkml.org/lkml/2015/10/2/693. Thanks, -Jason Jason Baron (3): unix: fix

  1   2   >