Re: [PATCH] rhashtable: don't attempt to grow when at max_size

2015-04-23 Thread Daniel Borkmann
On 04/23/2015 06:09 PM, Johannes Berg wrote: On Thu, 2015-04-23 at 11:59 -0400, David Miller wrote: This fixes the lost insertion issue and consequently allows my code to display its error (and verify my fix for it.) It looks fine to me, but I'll let Herbert and Thomas review this. Oh,

Re: [RFC 2/3] tc: deprecate TC_ACT_QUEUED

2015-04-23 Thread Daniel Borkmann
On 04/23/2015 08:12 PM, Cong Wang wrote: On Wed, Apr 22, 2015 at 7:46 PM, Alexei Starovoitov a...@plumgrid.com wrote: ... TC_ACT_QUEUED cannot be removed. Only deprecated with backwards compatibility the way this patch did it. That should have been obvious. It is at least the third time I

[PATCH iproute2 -next] examples: bpf: fix ld offs to have same prog loaded on ingress/egress

2015-04-20 Thread Daniel Borkmann
Fix up the eBPF example program to match our kernel fix in a166151cbe33 (bpf: fix bpf helpers to use skb-mac_header relative offsets). Tested on ingress and egress paths. Signed-off-by: Daniel Borkmann dan...@iogearbox.net Cc: Alexei Starovoitov a...@plumgrid.com --- ( Stephen, this applies

Re: [PATCH net-next] ip: Add color output option

2015-04-19 Thread Daniel Borkmann
On 04/18/2015 12:22 PM, Mathias Nyman wrote: ... I don't understand what you mean by -c is neither taken in ip nor in tc or ss. That just means we could in future consider to consistently add support for -c flag in those tools, too. -- To unsubscribe from this list: send the line unsubscribe

Re: [RFC 2/3] tc: deprecate TC_ACT_QUEUED

2015-04-24 Thread Daniel Borkmann
On 04/24/2015 05:37 AM, Cong Wang wrote: On Thu, Apr 23, 2015 at 5:59 PM, Alexei Starovoitov a...@plumgrid.com wrote: On 4/23/15 3:51 PM, Jamal Hadi Salim wrote: ... agree. imo ifb approach is more flexible, since it has full hierarchy of qdiscs. As you're saying above and from the old ifb

Re: [RFC 2/3] tc: deprecate TC_ACT_QUEUED

2015-04-23 Thread Daniel Borkmann
On 04/23/2015 04:46 AM, Alexei Starovoitov wrote: ... The other two threads degenerated into non-technical comments. Yep. :-/ Anyway, this set was RFC to answer my main question whether I should continue with tc cleanup or stop right here. I got my answer. I think it's worth proceeding

Re: [RFC 2/3] tc: deprecate TC_ACT_QUEUED

2015-04-22 Thread Daniel Borkmann
On 04/22/2015 07:02 AM, Cong Wang wrote: On Tue, Apr 21, 2015 at 12:27 PM, Alexei Starovoitov a...@plumgrid.com wrote: TC_ACT_QUEUED was always an alias of TC_ACT_STOLEN. Get rid of redundant checks in all qdiscs. Instead do it once. The current code can be easily extended, while your code

[PATCH iproute2 -master] tc: {m,f}_ebpf: add option for dumping verifier log

2015-04-28 Thread Daniel Borkmann
Currently, only on error we get a log dump, but I found it useful when working with eBPF to have an option to also dump the log on success. Also spotted a typo in a header comment, which is fixed here as well. Signed-off-by: Daniel Borkmann dan...@iogearbox.net Cc: Alexei Starovoitov

Re: [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option

2015-04-29 Thread Daniel Borkmann
On 04/29/2015 01:07 PM, Eric Dumazet wrote: On Wed, 2015-04-29 at 10:17 +0200, Daniel Borkmann wrote: On 04/29/2015 01:23 AM, Eric Dumazet wrote: Some Congestion Control modules can provide per flow information, but current way to get this information is to use netlink. Like TCP_INFO, let's

Re: [PATCH net-next 2/2] tcp: add TCP_CC_INFO socket option

2015-04-29 Thread Daniel Borkmann
tcp_cc_info info; }; Otherwise looks good: Acked-by: Daniel Borkmann dan...@iogearbox.net -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH net-next 1/2] tcp: prepare CC get_info() access from getsockopt()

2015-04-29 Thread Daniel Borkmann
can reuse this common infrastructure. Signed-off-by: Eric Dumazet eduma...@google.com Cc: Yuchung Cheng ych...@google.com Cc: Neal Cardwell ncardw...@google.com Looks good to me, thanks! Acked-by: Daniel Borkmann dan...@iogearbox.net -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH iproute2 -next v2] tc: built-in eBPF exec proxy

2015-04-28 Thread Daniel Borkmann
On 04/28/2015 01:41 AM, Stephen Hemminger wrote: ... This will go in for 4.1 version of iproute2. Ok, thanks! Btw, I noticed that we still need a header rebase for the 'master' branch. Due to the merge window, eBPF support for tracing came in as well meaning currently, the kernel thinks we

Re: [PATCH 6/6] net: move qdisc ingress filtering on top of netfilter ingress hooks

2015-04-29 Thread Daniel Borkmann
On 04/30/2015 01:32 AM, Pablo Neira Ayuso wrote: ... Actually, the extra cost is roughly (getting inlined stuff away and other non-relevant stuff): `- nf_hook_slow() `- [for each entry in hook list] `- nf_iterate() `- (*elemp)-hook() Yep, agreed. as part of the

[PATCH net-next 4/4] seccomp, filter: add and use bpf_prog_create_from_user from seccomp

2015-05-06 Thread Daniel Borkmann
and thus keep it's filter preparation code minimal and better maintainable. The other side-effect is that now classic JITs can add seccomp support as well by only providing a BPF_LDX | BPF_W | BPF_ABS translation. Tested with seccomp and BPF test suites. Signed-off-by: Daniel Borkmann dan

[PATCH net-next 2/2] net: sched: further simplify handle_ing

2015-05-09 Thread Daniel Borkmann
kfree'd by sched subsystem after RCU grace period. RCU read lock is being held by __netif_receive_skb_core(). Joint work with Alexei Starovoitov. Signed-off-by: Daniel Borkmann dan...@iogearbox.net Signed-off-by: Alexei Starovoitov a...@plumgrid.com --- include/linux/netdevice.h | 4 net

Re: [PATCH iproute2] ss: dctcp changes

2015-05-08 Thread Daniel Borkmann
Eric! Acked-by: Daniel Borkmann dan...@iogearbox.net -- 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: [net-next PATCH] net: Fix ifdef typo in net_device definition

2015-05-11 Thread Daniel Borkmann
On 05/11/2015 08:31 PM, Alexander Duyck wrote: While trying to build for some performance testing I received the error message below multiple times: include/linux/netdevice.h:1658:5: warning: CONFIG_NET_CLS_ACT is not defined [-Wundef] #if CONFIG_NET_CLS_ACT It looks like this was just a

Re: gone with the spring cleanup..

2015-05-13 Thread Daniel Borkmann
On 05/13/2015 12:55 PM, Or Gerlitz wrote: On 5/13/2015 1:42 PM, Jiri Pirko wrote: Looks like the problem might be in named structures which suppose to be anonymous. Would you try following patch: oh, switchdev_obj_vlan and switchdev_obj_ipv4_fib is used in rocker.. So better: nope, fails..

[PATCH iproute2 -next] tc: built-in eBPF exec proxy

2015-04-15 Thread Daniel Borkmann
-time classifications, skb modifications, ...), dumping of statistics, etc. Reference: http://thread.gmane.org/gmane.linux.network/357471/focus=357860 Suggested-by: Hannes Frederic Sowa han...@stressinduktion.org Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- ( Stephen, this applies

Re: [PATCH net] bpf: fix verifier memory corruption

2015-04-15 Thread Daniel Borkmann
+0x806/0xa30 Fixes: f1bca824dabb (bpf: add search pruning optimization to verifier) Signed-off-by: Alexei Starovoitov a...@plumgrid.com As far as I can tell, looks good to me. Any other access to a next instruction elsewhere would be blocked from push_insn() with an error. Acked-by: Daniel Borkmann

Re: [Xen-devel] tcp: refine TSO autosizing causes performance regression on Xen

2015-04-16 Thread Daniel Borkmann
On 04/16/2015 10:56 AM, George Dunlap wrote: On 04/15/2015 07:19 PM, Eric Dumazet wrote: On Wed, 2015-04-15 at 19:04 +0100, George Dunlap wrote: Maybe you should stop wasting all of our time and just tell us what you're thinking. I think you make me wasting my time. I already gave all the

Re: [PATCH iproute2 -next] tc: built-in eBPF exec proxy

2015-04-16 Thread Daniel Borkmann
On 04/16/2015 07:48 PM, Alexei Starovoitov wrote: On 4/15/15 7:52 AM, Daniel Borkmann wrote: File descriptors, based on their id, are being fetched from the same unix domain socket as demonstrated in the bpf_agent, the shell spawned via execvpe(2) and the map fds passed over the environment

[PATCH iproute2 -next v2] tc: built-in eBPF exec proxy

2015-04-16 Thread Daniel Borkmann
-time classifications, skb modifications, ...), dumping of statistics, etc. Reference: http://thread.gmane.org/gmane.linux.network/357471/focus=357860 Suggested-by: Hannes Frederic Sowa han...@stressinduktion.org Signed-off-by: Daniel Borkmann dan...@iogearbox.net Reviewed-by: Hannes Frederic Sowa han

Re: [PATCH net] inet_diag: fix access to tcp cc information

2015-04-17 Thread Daniel Borkmann
this by returning a status from get_info() handlers and using rcu protection as well. Signed-off-by: Eric Dumazet eduma...@google.com Thanks Eric! Acked-by: Daniel Borkmann dan...@iogearbox.net -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord

Re: [PATCH net-next] ip: Add color output option

2015-04-17 Thread Daniel Borkmann
On 04/17/2015 06:44 PM, Alexei Starovoitov wrote: On Fri, Apr 17, 2015 at 04:02:02PM +0300, Mathias Nyman wrote: It is hard to quickly find what you are looking for in the output of the ip command. Color helps. This patch adds a '-c' flag to highlight these with individual colors: -

Re: [PATCH 0/7 RFC] Netfilter/nf_tables ingress support

2015-04-15 Thread Daniel Borkmann
On 04/15/2015 09:35 AM, John Fastabend wrote: On 04/14/2015 08:36 AM, Alexei Starovoitov wrote: On Tue, Apr 14, 2015 at 08:12:18AM -0700, John Fastabend wrote: I was hoping to push the skb lists onto something like rte_ring used by the DPDK folks or possibly some of the lockless ring work

Re: [PATCH 15/17] switch kernel_sendmsg() and kernel_recvmsg() to iov_iter_kvec()

2015-04-15 Thread Daniel Borkmann
On 04/15/2015 11:08 AM, David Laight wrote: ... Apart from any other code that is using the interface. I know you guys don't do anything to help out of tree code, but removing the setfs() stuff from the kernel_recvmsg() code would break anything using sctp. Then that might just be one more

Re: Kernel crash while using tc script

2015-05-19 Thread Daniel Borkmann
On 05/19/2015 10:11 PM, Vijay Subramanian wrote: Hi, It seems latest net-next kernel crashes while unloading modules. Please see simple script below to reproduce the crash. === #!/bin/bash while true; do # modules will be loaded automatically tc qdisc add dev

Re: [PATCH net] net: sched: fix call_rcu() race on classifier module unloads

2015-05-20 Thread Daniel Borkmann
On 05/20/2015 07:38 PM, Cong Wang wrote: ... Why synchronize_rcu() even matters here? It waits for readers, not for RCU callbacks. Hm, I am mentioning it here as it was related to 78fd1d0ab072 as explained in the commit message. Since we came here via unregister_tcf_proto_ops(), there are no

[PATCH iproute2 -next] tc: {f,m}_bpf: allow to retrieve uds path from env

2015-06-02 Thread Daniel Borkmann
Allow to retrieve uds path from the environment, facilitates also dealing with export a bit. Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- tc/f_bpf.c | 6 -- tc/m_bpf.c | 6 -- tc/tc_bpf.h | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tc/f_bpf.c b/tc

Re: [PATCH v2] bpf: BPF based latency tracing

2015-06-20 Thread Daniel Borkmann
to each other in columns and maybe the histogram view a bit more compressed (perhaps summary of all CPUs). Anyway, it's sample code people can go with and modify individually. Acked-by: Daniel Borkmann dan...@iogearbox.net -- To unsubscribe from this list: send the line unsubscribe netdev in

Re: [PATCH iproute2] ss: Fix allocation of cong control alg name

2015-06-25 Thread Daniel Borkmann
On 06/25/2015 05:31 AM, Stephen Hemminger wrote: On Fri, 29 May 2015 18:48:42 +0200 Daniel Borkmann dan...@iogearbox.net wrote: On 05/29/2015 06:17 PM, Guzman Mosqueda, Jose R wrote: Hi Daniel and Vadim Thanks for your prompt response and for the patch. Also, what about the other one? Do

Re: [PATCH net-next] test_bpf: extend tests for 32-bit endianness conversion

2015-06-27 Thread Daniel Borkmann
Thanks for extending the test suite! Acked-by: Daniel Borkmann dan...@iogearbox.net -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH net-next] net: tcp: dctcp_update_alpha() fixes.

2015-06-11 Thread Daniel Borkmann
expose an overflow with 32bit values shifted 9 times before divide. Use an u64 field to avoid this problem, and perform the divide only if acked_bytes_ecn is not zero. Signed-off-by: Eric Dumazet eduma...@google.com Change looks correct to me, thanks Eric! Acked-by: Daniel Borkmann dan

Re: iproute2: missing patches in branch net-next

2015-06-12 Thread Daniel Borkmann
On 05/29/2015 01:15 AM, Daniel Borkmann wrote: On 05/29/2015 01:12 AM, Stephen Hemminger wrote: ... I will go back and recreate what is missing. Sorry for the confusion. Great thanks, no problem. Hmm, two weeks have passed. :/ Is there any progress so far? -- To unsubscribe from this list

Re: [PATCH v2 net-next 0/3] bpf: share helpers between tracing and networking

2015-06-18 Thread Daniel Borkmann
On 06/16/2015 07:10 PM, Alexei Starovoitov wrote: ... Ideally we would allow a blend of tracing and networking programs, then the best solution would be one or two stable tracepoints in networking stack where skb is visible and receiving/transmitting task is also visible, then skb-len and

Re: [PATCH v2 net-next 3/3] bpf: let kprobe programs use bpf_get_smp_processor_id() helper

2015-06-13 Thread Daniel Borkmann
On 06/13/2015 04:39 AM, Alexei Starovoitov wrote: It's useful to do per-cpu histograms. Suggested-by: Daniel Wagner daniel.wag...@bmw-carit.de Signed-off-by: Alexei Starovoitov a...@plumgrid.com Acked-by: Daniel Borkmann dan...@iogearbox.net -- To unsubscribe from this list: send the line

Re: [PATCH v2 net-next 0/3] bpf: share helpers between tracing and networking

2015-06-16 Thread Daniel Borkmann
On 06/16/2015 05:28 AM, Alexei Starovoitov wrote: On 6/15/15 4:01 PM, David Miller wrote: Although I agree with the sentiment that this thing can cause surprising results and can be asking for trouble. If someone wants to filter traffic by UID they might make a simple ingress TC ebpf program

Re: [PATCH] sctp: Fix mangled IPv4 addresses on a IPv6 listening socket

2015-05-27 Thread Daniel Borkmann
On 05/27/2015 11:06 AM, David Laight wrote: From: Jason Gunthorpe ... Fixes: 299ee123e198 (sctp: Fixup v4mapped behaviour to comply with Sock API) ... This bugfix should be a candidate for -stable Anyone know off-hand which kernel releases are affected? I'm going to have to note this in

Re: iproute2: missing patches in branch net-next

2015-05-28 Thread Daniel Borkmann
On 05/29/2015 01:12 AM, Stephen Hemminger wrote: ... I will go back and recreate what is missing. Sorry for the confusion. Great thanks, no problem. -- 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

Re: Possible issue in iproute2 package

2015-05-28 Thread Daniel Borkmann
Hi Jose, thanks for your report! On 05/28/2015 11:12 PM, Guzman Mosqueda, Jose R wrote: ... We're using iproute2 in a GNU-Linux project and I'm analyzing the code to try to find possible issues/gaps/risks. Since I'm not too familiar with the package yet I have a question about a particular

Re: [PATCH net-next] bpf: allow BPF programs access skb-skb_iif and skb-dev-ifindex fields

2015-05-28 Thread Daniel Borkmann
a...@plumgrid.com Acked-by: Daniel Borkmann dan...@iogearbox.net -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH net-next] bpf: allow BPF programs access skb-skb_iif and skb-dev-ifindex fields

2015-05-29 Thread Daniel Borkmann
interface it always appears as separate thread and doesn't register in patchwork. So now I've switched to mutt and thunderbird only :) patchwork lost 22 hours of list traffic, but it should be functioning normally now Ok, great. So, lets try once more. :) Acked-by: Daniel Borkmann dan

Re: [PATCH iproute2] ss: Fix allocation of cong control alg name

2015-05-29 Thread Daniel Borkmann
On 05/29/2015 01:04 PM, Eric Dumazet wrote: ... I doubt TCP_CA_NAME_MAX will ever change in the kernel : 16 bytes. Its typically cubic and less than 8 bytes. Using 8 bytes to point to a malloc(8) is a waste. Please remove the memory allocation, or store the pointer, since tcp_show_info() does

Re: [PATCH iproute2] ss: Fix allocation of cong control alg name

2015-05-29 Thread Daniel Borkmann
Hi Vadim, On 05/29/2015 12:30 PM, Vadim Kochan wrote: From: Vadim Kochan vadi...@gmail.com Use strdup instead of malloc, and get rid of bad strcpy. Signed-off-by: Vadim Kochan vadi...@gmail.com Please also Cc the reporter (done here), and add a: Fixes: 8250bc9ff4e5 (ss: Unify inet sockets

[PATCH iproute2 -next] tc: {f,m}_bpf: add tail call support for parser

2015-05-29 Thread Daniel Borkmann
works with any number of prog arrays in any dependencies, e.g. prog or normal maps could also be used from progs that are tail-called themself, etc. Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- [ doc will follow later some time after -next branch has man page again. ] tc/tc_bpf.c | 139

Re: [PATCH iproute2] ss: Fix allocation of cong control alg name

2015-05-29 Thread Daniel Borkmann
On 05/29/2015 06:17 PM, Guzman Mosqueda, Jose R wrote: Hi Daniel and Vadim Thanks for your prompt response and for the patch. Also, what about the other one? Do you think it is an issue or not? File: tc/tc_util.c Function: void print_rate(char *buf, int len, __u64 rate) Line: ~264 In the

Re: [PATCH net-next] bpf: add missing rcu protection when releasing programs from prog_array

2015-05-30 Thread Daniel Borkmann
On 05/30/2015 01:22 AM, Alexei Starovoitov wrote: ... Like __sk_filter_release() and __bpf_prog_release() should be removed. The whole filter cleanup procedure needs to be simplified a bit, got a bit too complicated over time, agreed. Of course, it's a grey line when to introduce a helper

Re: iproute2: missing patches in branch net-next

2015-05-28 Thread Daniel Borkmann
On 05/28/2015 06:19 PM, Stephen Hemminger wrote: On Thu, 28 May 2015 13:31:08 +0200 Nicolas Dichtel nicolas.dich...@6wind.com wrote: Hi Stephen, some patches that were recently included in iproute2 branch net-next are not visible anymore on kernel.org. It seems that the branch has been

[PATCH iproute2] tc: util: fix print_rate for ludicrous speeds

2015-05-29 Thread Daniel Borkmann
jose.r.guzman.mosqu...@intel.com Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- tc/tc_util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tc/tc_util.c b/tc/tc_util.c index dc2b70f..aa6de24 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -250,18 +250,19 @@ void print_rate

Re: [PATCH] sctp: Fix mangled IPv4 addresses on a IPv6 listening socket

2015-05-27 Thread Daniel Borkmann
: Acked-by: Daniel Borkmann dan...@iogearbox.net addr-v6.sin6_addr.s6_addr32[0] = 0; addr-v6.sin6_addr.s6_addr32[1] = 0; addr-v6.sin6_addr.s6_addr32[2] = htonl(0x); -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message

Re: [PATCH net] tcp: fix child sockets to use system default congestion control if not set

2015-05-29 Thread Daniel Borkmann
tcp cong_ops when tcp sk is created) Cc: Florian Westphal f...@strlen.de Cc: Daniel Borkmann dbork...@redhat.com Cc: Glenn Judd glenn.j...@morganstanley.com Cc: Stephen Hemminger step...@networkplumber.org Signed-off-by: Neal Cardwell ncardw...@google.com Signed-off-by: Eric Dumazet eduma

[PATCH net-next 2/2] ebpf: misc core cleanup

2015-05-29 Thread Daniel Borkmann
Besides others, move bpf_tail_call_proto to the remaining definitions of other protos, improve comments a bit (i.e. remove some obvious ones, where the code is already self-documenting, add objectives for others), simplify bpf_prog_array_compatible() a bit. Signed-off-by: Daniel Borkmann dan

[PATCH net-next 1/2] ebpf: allow bpf_ktime_get_ns_proto also for networking

2015-05-29 Thread Daniel Borkmann
-by: Daniel Borkmann dan...@iogearbox.net Cc: Alexei Starovoitov a...@plumgrid.com Cc: Ingo Molnar mi...@kernel.org --- include/linux/bpf.h | 1 + kernel/bpf/core.c| 1 + kernel/bpf/helpers.c | 13 + kernel/trace/bpf_trace.c | 12 net/core/filter.c| 2

[PATCH net-next 0/2] bpf misc update

2015-05-29 Thread Daniel Borkmann
Daniel Borkmann (2): ebpf: allow bpf_ktime_get_ns_proto also for networking ebpf: misc core cleanup include/linux/bpf.h | 1 + kernel/bpf/core.c| 73 kernel/bpf/helpers.c | 47 --- kernel/trace

Re: [PATCH] rtnetlink: Actually use the policy for the IFLA_VF_INFO

2015-07-01 Thread Daniel Borkmann
Hi Jason, On 07/01/2015 12:52 AM, Jason Gunthorpe wrote: It turns out the policy was defined but never actually checked, so lets check it. Fixes: ebc08a6f47ee (rtnetlink: Add VF config code to rtnetlink) I would argue that the actual commit would be ... Fixes: c02db8c6290b (rtnetlink: make

Re: [PATCH] rtnetlink: Actually use the policy for the IFLA_VF_INFO

2015-07-02 Thread Daniel Borkmann
On 07/01/2015 11:36 AM, Daniel Borkmann wrote: Hi Jason, On 07/01/2015 12:52 AM, Jason Gunthorpe wrote: It turns out the policy was defined but never actually checked, so lets check it. Fixes: ebc08a6f47ee (rtnetlink: Add VF config code to rtnetlink) I would argue that the actual commit

Re: [PATCH] rtnetlink: Actually use the policy for the IFLA_VF_INFO

2015-07-03 Thread Daniel Borkmann
On 07/03/2015 01:06 AM, Jason Gunthorpe wrote: On Thu, Jul 02, 2015 at 10:34:54AM +0200, Daniel Borkmann wrote: So, commit c02db8c6290b moved it into a nested attribute (IFLA_VF_INFO) where we indeed don't do further validation. Imho, we should pass the parsed attribute table from

Re: tc ingress filters not applied

2015-07-06 Thread Daniel Borkmann
On 07/06/2015 07:24 PM, Huan Le wrote: Erik Hugne erik.hugne at ericsson.com writes: I'm having troubles with TC policing, the ingress filters does not seem to be applied. Kernel: net-next/latest iproute2: shemminger/master //E I observed similar behavior when configuring a filter on

[PATCH net] rtnetlink: verify IFLA_VF_INFO attributes before passing them to driver

2015-07-06 Thread Daniel Borkmann
-by: Jason Gunthorpe jguntho...@obsidianresearch.com Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- net/core/rtnetlink.c | 187 ++- 1 file changed, 96 insertions(+), 91 deletions(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index

[PATCH net] tools: bpf_jit_disasm: fix segfault on disabled debugging log output

2015-05-25 Thread Daniel Borkmann
need zero out offsets first. Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- tools/net/bpf_jit_disasm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/net/bpf_jit_disasm.c b/tools/net/bpf_jit_disasm.c index c5baf9c..618c2bc 100644 --- a/tools/net/bpf_jit_disasm.c +++ b/tools

[PATCH net-next] test_bpf: add more eBPF jump torture cases

2015-05-22 Thread Daniel Borkmann
backwards jited:1 6 PASS [ 80.495957] test_bpf: #243 BPF_MAXINSNS: Edge hopping nuthouse jited:1 17157 PASS Reference: http://thread.gmane.org/gmane.linux.network/364729 Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- (Testcase to Alexei's patch.) lib/test_bpf.c | 67

Re: [PATCH net] x86: bpf_jit: fix compilation of large bpf programs

2015-05-22 Thread Daniel Borkmann
iteration over bpf program. Fixes: 0a14842f5a3c (net: filter: Just In Time compiler for x86-64) Reported-by: Daniel Borkmann dan...@iogearbox.net Signed-off-by: Alexei Starovoitov a...@plumgrid.com LGTM, thanks! Tested-by: Daniel Borkmann dan...@iogearbox.net Acked-by: Daniel Borkmann dan

[PATCH iproute2] tc: bpf: add initial man page

2015-05-21 Thread Daniel Borkmann
start documenting their classifier and actions as well. ;) Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- man/man8/Makefile | 2 +- man/man8/tc-bpf.8 | 924 ++ man/man8/tc.8 | 1 + 3 files changed, 926 insertions(+), 1 deletion

Re: [PATCH net-next] test_bpf: Add backward jump test case

2015-05-22 Thread Daniel Borkmann
holz...@linux.vnet.ibm.com Signed-off-by: Alexei Starovoitov a...@plumgrid.com Acked-by: Daniel Borkmann dan...@iogearbox.net -- 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

[PATCH net] net: sched: fix call_rcu() race on classifier module unloads

2015-05-20 Thread Daniel Borkmann
a work item, to unlock pages eventually, but that is not in the range/context of cls_bpf anymore. Fixes: 25d8c0d55f24 (net: rcu-ify tcf_proto) Fixes: 9888faefe132 (net: sched: cls_basic use RCU) Reported-by: Vijay Subramanian subramanian.vi...@gmail.com Signed-off-by: Daniel Borkmann dan

Re: [PATCH net-next 1/4] bpf: allow bpf programs to tail-call other bpf programs

2015-05-21 Thread Daniel Borkmann
into the next program. ... Signed-off-by: Alexei Starovoitov a...@plumgrid.com LGTM, thanks! Acked-by: Daniel Borkmann dan...@iogearbox.net -- 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

Re: [PATCH net-next] test_bpf: add similarly conflicting jump test case only for classic

2015-05-26 Thread Daniel Borkmann
On 05/26/2015 07:45 PM, Daniel Borkmann wrote: While 3b52960266a3 (test_bpf: add more eBPF jump torture cases) added the int3 bug test case only for eBPF, which needs exactly 11 passes to converge, here's a version for classic BPF that would ... Noticed a newline accidentally slipped

[PATCH net-next v2] test_bpf: add similarly conflicting jump test case only for classic

2015-05-26 Thread Daniel Borkmann
programs) while not having eBPF. The 2nd one is delegated to the interpreter as the last pass still results in shrinking, in other words, this one won't be JITed on x86_64. Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- v1 - v2: - Fixed newline, added 2nd case lib/test_bpf.c | 57

[PATCH net-next] test_bpf: add similarly conflicting jump test case only for classic

2015-05-26 Thread Daniel Borkmann
eBPF. With the fix, it's delegated to the interpreter, if the last pass still results in shrinking, in other words this one here won't be JITed on x86_64. Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- lib/test_bpf.c | 36 1 file changed, 36 insertions

Re: [PATCH 2/6] test_bpf: allow tests to specify an skb fragment.

2015-08-03 Thread Daniel Borkmann
Starovoitov a...@plumgrid.com Acked-by: Daniel Borkmann dan...@iogearbox.net I'm good with this change here, just a comment below in general. enum { CLASSIC = BIT(6), /* Old BPF instructions only. */ @@ -81,6 +83,7 @@ struct bpf_test { __u32 result; } test

[PATCH net-next] act_bpf: properly support late binding of bpf action to a classifier

2015-08-03 Thread Daniel Borkmann
with multiple classifiers. Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- This one was still in my queue of fixes, net-next is totally fine here. Will push out minor iproute2 change afterwards. net/sched/act_bpf.c | 51 +++ 1 file changed, 27

Re: [PATCH 1/6] test_bpf: avoid oopsing the kernel when generate_test_data() fails.

2015-08-03 Thread Daniel Borkmann
On 08/03/2015 04:02 PM, Nicolas Schichan wrote: Signed-off-by: Nicolas Schichan nschic...@freebox.fr Acked-by: Alexei Starovoitov a...@plumgrid.com Acked-by: Daniel Borkmann dan...@iogearbox.net -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message

Re: [PATCH net-next v2 1/4] packet: add classic BPF fanout mode

2015-08-16 Thread Daniel Borkmann
looks good to me as well (sorry for the lag, on travel). Thanks Willem! Acked-by: Daniel Borkmann dan...@iogearbox.net -- 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

Re: [PATCH net-next v2 2/4] packet: add extended BPF fanout mode

2015-08-16 Thread Daniel Borkmann
returned by bpf(). Signed-off-by: Willem de Bruijn will...@google.com Acked-by: Daniel Borkmann dan...@iogearbox.net -- 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

Re: [PATCHv1 net-next 0/5] netlink: mmap: kernel panic and some issues

2015-08-19 Thread Daniel Borkmann
On 08/17/2015 11:02 PM, David Miller wrote: From: Daniel Borkmann dan...@iogearbox.net Date: Fri, 14 Aug 2015 12:38:21 +0200 diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 67d2104..4307446 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -238,6

Re: [PATCH net] sctp: partial chunk should be drop without sending abort packet

2015-08-24 Thread Daniel Borkmann
On 08/24/2015 02:47 PM, Marcelo Ricardo Leitner wrote: On Mon, Aug 24, 2015 at 06:08:30PM +0800, Xin Long wrote: as RFC 4960, 6.10 said, *if the receiver detects a partial chunk, it MUST drop the chunk*, we should not send the abort. but if we put this discard to inside state machine, it will

[PATCH net] act_bpf: fix memory leaks when replacing bpf programs

2015-07-29 Thread Daniel Borkmann
/sys/kernel/debug/kmemleak | grep comm \tc\ | wc -l 0 Fixes: d23b8ad8ab23 (tc: add BPF based action) Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- net/sched/act_bpf.c | 53 +++-- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git

[PATCH net] ebpf, x86: fix general protection fault when tail call is invoked

2015-07-28 Thread Daniel Borkmann
: implement bpf_tail_call() helper) Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- arch/x86/net/bpf_jit_comp.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c index 55e3eba..7288838 100644 --- a/arch/x86

[PATCH net] net: sched: fix refcount imbalance in actions

2015-07-29 Thread Daniel Borkmann
correct reference count again. Fixes: 55334a5db5cd (net_sched: act: refuse to remove bound action outside) Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- include/net/act_api.h | 8 +++- net/sched/act_api.c | 11 ++- 2 files changed, 13 insertions(+), 6 deletions(-) diff

[PATCH net-next] bpf_jit_disasm: also support reading jit dump from file

2015-07-30 Thread Daniel Borkmann
This patch adds support to read the dmesg BPF JIT dump also from a file instead of the klog buffer. I found this quite useful when going through some 'before/after patch' logs. It also fixes a regex leak found by valgrind when no image dump was found. Signed-off-by: Daniel Borkmann dan

Re: [PATCH net] net: sched: fix refcount imbalance in actions

2015-07-29 Thread Daniel Borkmann
On 07/30/2015 02:33 AM, Cong Wang wrote: ... diff --git a/net/sched/act_api.c b/net/sched/act_api.c index af427a3..bd63a39 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -53,8 +53,11 @@ int tcf_hash_release(struct tc_action *a, int bind) if (p) { if

Re: [PATCH net] net: sched: fix refcount imbalance in actions

2015-07-30 Thread Daniel Borkmann
On 07/30/2015 08:48 PM, Cong Wang wrote: ... Right, I think your patch should be fine for net. The code is kinda messy, but we can always clean up the logic for net-next. I agree with you. I.e. there could just be a single refcount taking care of the cleanup/destruction, etc. Reviewed-by:

Re: [PATCH net-next] net_sched: act_bpf: remove spinlock in fast path

2015-08-04 Thread Daniel Borkmann
On 08/04/2015 07:09 AM, Alexei Starovoitov wrote: Similar to act_gact/act_mirred, act_bpf can be lockless in packet processing. Also similar to gact/mirred there is a race between prog-filter and prog-tcf_action. Meaning that the program being replaced may use previous default action if it

[PATCH net-next] ebpf: add skb-hash to offset map for usage in {cls,act}_bpf or filters

2015-07-31 Thread Daniel Borkmann
seems fine in this case: we can directly access the hash w/o extra eBPF helper function call, it's filled out by many NICs on ingress, and in case the entropy level would not be sufficient, people can still implement their own specific sw fallback hash mix anyway. Signed-off-by: Daniel Borkmann dan

Re: [Patch net] act_mirred: avoid calling tcf_hash_release() when binding

2015-07-31 Thread Daniel Borkmann
On 08/01/2015 12:25 AM, Cong Wang wrote: On Fri, Jul 31, 2015 at 3:06 AM, Daniel Borkmann dan...@iogearbox.net wrote: Did you test all variants on this? I.e. what happens when you replace an existing one, I think the refcnt should also be dropped here. It looks like we only drop it, in case we

Re: [PATCH] packet: tpacket_snd(): fix signed/unsigned comparison

2015-07-28 Thread Daniel Borkmann
unsigned. That may lead to just returning an incorrect EMSGSIZE errno to the user. Signed-off-by: Alexander Drozdov al.droz...@gmail.com Looks good to me, thanks! Acked-by: Daniel Borkmann dan...@iogearbox.net -- To unsubscribe from this list: send the line unsubscribe netdev in the body

Re: [PATCH net] ebpf, x86: fix general protection fault when tail call is invoked

2015-07-28 Thread Daniel Borkmann
On 07/28/2015 07:02 PM, Alexei Starovoitov wrote: On 7/28/15 6:26 AM, Daniel Borkmann wrote: After patch, disassembly: [...] 9e: lea0x80(%rsi,%rdx,8),%rax --- CONFIG_LOCKDEP/CONFIG_LOCK_STAT 48 8d 84 d6 80 00 00 00 a6: mov(%rax),%rax 48 8b 00

Re: [BUG] net/ipv4: inconsistent routing table

2015-08-05 Thread Daniel Borkmann
[ please cc netdev ] On 08/05/2015 10:56 AM, Zang MingJie wrote: Hi: I found a bug when remove an ip address which is referenced by a routing entry. step to reproduce: ip li add type dummy ip li set dummy0 up ip ad add 10.0.0.1/24 dev dummy0 ip ad add 10.0.0.2/24 dev dummy0 ip ro add default

Re: rtnl_mutex deadlock?

2015-08-05 Thread Daniel Borkmann
immediate rehash during insertion) Reported-by: Linus Torvalds torva...@linux-foundation.org Signed-off-by: Daniel Borkmann dan...@iogearbox.net --- net/netlink/af_netlink.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index d8e2e39..1cfd4af

Re: [PATCH 3/6] test_bpf: test LD_ABS and LD_IND instructions on fragmented skbs.

2015-08-03 Thread Daniel Borkmann
On 08/03/2015 04:02 PM, Nicolas Schichan wrote: These new tests exercise various load sizes and offsets crossing the head/fragment boundary. Signed-off-by: Nicolas Schichan nschic...@freebox.fr Acked-by: Alexei Starovoitov a...@plumgrid.com Acked-by: Daniel Borkmann dan...@iogearbox.net

Re: [PATCH 5/6] test_bpf: add more tests for LD_ABS and LD_IND.

2015-08-03 Thread Daniel Borkmann
Acked-by: Alexei Starovoitov a...@plumgrid.com Acked-by: Daniel Borkmann dan...@iogearbox.net -- 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 6/6] test_bpf: add tests checking that JIT/interpreter sets A and X to 0.

2015-08-03 Thread Daniel Borkmann
Starovoitov a...@plumgrid.com Acked-by: Daniel Borkmann dan...@iogearbox.net -- 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/6] test_bpf: add module parameters to filter the tests to run.

2015-08-03 Thread Daniel Borkmann
On 08/03/2015 06:23 PM, Nicolas Schichan wrote: ... Btw, for the range test in prepare_bpf_tests(), you could also reject a negative lower bound index right there. I thought it was better to have all the sanity checks grouped in prepare_bpf_tests() (with the checking of the test_name and

Re: [PATCH 2/6] test_bpf: allow tests to specify an skb fragment.

2015-08-03 Thread Daniel Borkmann
On 08/03/2015 06:38 PM, Nicolas Schichan wrote: On 08/03/2015 05:29 PM, Daniel Borkmann wrote: On 08/03/2015 04:02 PM, Nicolas Schichan wrote: We now have 286 tests, which is awesome! Perhaps, we need to start thinking of a better test description method soonish as the test_bpf.ko module grew

Re: [PATCH net-next] ebpf: add skb-hash to offset map for usage in {cls,act}_bpf or filters

2015-08-03 Thread Daniel Borkmann
On 08/03/2015 08:16 AM, Alexei Starovoitov wrote: On 8/2/15 6:09 PM, Tom Herbert wrote: I was thinking whether to add skb_get_hash(), but then concluded the raw skb-hash seems fine in this case: we can directly access the hash w/o extra eBPF helper function call, it's filled out by many NICs on

Re: [Patch net] act_pedit: check binding before calling tcf_hash_release()

2015-07-31 Thread Daniel Borkmann
On 07/31/2015 02:12 AM, Cong Wang wrote: When we share an action within a filter, the bind refcnt should increase, therefore we should not call tcf_hash_release(). Cc: Jamal Hadi Salim j...@mojatatu.com Cc: Daniel Borkmann dan...@iogearbox.net Signed-off-by: Cong Wang xiyou.wangc...@gmail.com

Re: [Patch net] act_mirred: avoid calling tcf_hash_release() when binding

2015-07-31 Thread Daniel Borkmann
On 07/31/2015 02:12 AM, Cong Wang wrote: When we share an action within a filter, the bind refcnt should increase, therefore we should not call tcf_hash_release(). Cc: Jamal Hadi Salim j...@mojatatu.com Cc: Daniel Borkmann dan...@iogearbox.net Signed-off-by: Cong Wang xiyou.wangc...@gmail.com

[PATCH net-next 2/4] bpf: provide helper that indicates eBPF was migrated

2015-07-30 Thread Daniel Borkmann
not set a particular type, but all have BPF_PROG_TYPE_UNSPEC. Thus, introduce a small helper for cde66c2d88da (s390/bpf: Only clear A and X for converted BPF programs) and possibly others in future. Signed-off-by: Daniel Borkmann dan...@iogearbox.net Cc: Michael Holzheu holz...@linux.vnet.ibm.com

[PATCH net-next 0/4] Minor BPF updates

2015-07-30 Thread Daniel Borkmann
Various minor misc updates. Thanks! Daniel Borkmann (4): test_bpf: assign type to native eBPF test cases bpf: provide helper that indicates eBPF was migrated bpf, x86/sparc: show actual number of passes in bpf_jit_dump bpf: also show process name/pid in bpf_jit_dump arch/s390/net

  1   2   3   4   5   6   7   8   9   10   >