[PATCH bpf-next] libbpf: Fix unintentional success return code in bpf_object__load

2020-08-26 Thread Alex Gartrell
: 4f33ddb4e3e2 ("libbpf: Propagate EPERM to caller on program load") Signed-off-by: Alex Gartrell --- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 2e2523d8bb6d..8f9e7d281225 100644 --- a/tools/lib/bp

Re: [PATCH] net: Provide lwtstate_free for non-lwt config

2015-08-19 Thread Alex Gartrell
On Wed, Aug 19, 2015 at 4:28 PM, Eric Dumazet wrote: > We've seen similar patches earlier today on netdev ;) Ah, the mailing list equivalent of someone letting you know that you left your fly down :) Sorry for the noise! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the

Re: [PATCH] net: Provide lwtstate_free for non-lwt config

2015-08-19 Thread Alex Gartrell
On Wed, Aug 19, 2015 at 3:16 PM, Alex Gartrell wrote: > Fixes: df383e624 ("lwtunnel: fix memory leak") Ah sorry, this is PATCH net-next, obviously :/ -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org

[PATCH] net: Provide lwtstate_free for non-lwt config

2015-08-19 Thread Alex Gartrell
Fixes: df383e624 ("lwtunnel: fix memory leak") Signed-off-by: Alex Gartrell --- include/net/lwtunnel.h | 4 1 file changed, 4 insertions(+) diff --git a/include/net/lwtunnel.h b/include/net/lwtunnel.h index 34fd8f7..cfee539 100644 --- a/include/net/lwtunnel.h +++ b/include/net/

Re: Panic with demuxed ipv4 multicast udp sockets on 4.0.4

2015-08-12 Thread Alex Gartrell
Hey Gregory, On Sun, Aug 2, 2015 at 2:28 PM, Gregory Hoggarth wrote: > I will apply the new suggested patch, reverting previous patch, and test > overnight and update tomorrow. Did this solve your problem? If not, would you mind sharing a repro? -- Alex Gartrell -- To unsubscribe fro

[PATCH net-next] ebpf: Allow dereferences of PTR_TO_STACK registers

2015-07-23 Thread Alex Gartrell
s and the appropriate offset, so we should be able to validate those references as well. Signed-off-by: Alex Gartrell --- kernel/bpf/verifier.c | 6 - samples/bpf/test_verifier.c | 59 + 2 files changed, 64 insertions(+), 1 deletion(-) di

Re: [RFC PATCH net-next] ebpf: Allow dereferences of PTR_TO_STACK registers

2015-07-22 Thread Alex Gartrell
On Tue, Jul 21, 2015 at 8:00 PM, Alexei Starovoitov wrote: > On Tue, Jul 21, 2015 at 07:00:40PM -0700, Alex Gartrell wrote: >> mov %rsp, %r1 ; r1 = rsp >> add $-8, %r1; r1 = rsp - 8 >> store_q $123, -8(%rsp) ; *(u6

[RFC PATCH net-next] ebpf: Allow dereferences of PTR_TO_STACK registers

2015-07-21 Thread Alex Gartrell
s and the appropriate offset, so we should be able to validate those references as well. Signed-off-by: Alex Gartrell --- kernel/bpf/verifier.c | 9 + 1 file changed, 9 insertions(+) diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 039d866..5dfbece 100644 --- a/kernel

Re: Why return E2BIG from bpf map update?

2015-07-21 Thread Alex Gartrell
On Tue, Jul 21, 2015 at 2:40 AM, Daniel Borkmann wrote: > On 07/21/2015 12:24 AM, Alexei Starovoitov wrote: >> >> On 7/20/15 3:15 PM, Alex Gartrell wrote: >>> >>> The ship has probably sailed on this one, but it seems like ENOSPC >>> makes more sense than

Why return E2BIG from bpf map update?

2015-07-20 Thread Alex Gartrell
goto err; net-next/master:kernel/bpf/hashtab.c- } net-next/master:kernel/bpf/hashtab.c- net-next/master:kernel/bpf/hashtab.c- if (l_old && map_flags == BPF_NOEXIST) { net-next/master:kernel/bpf/hashtab.c- /* elem already exists */ -- Alex Gartrell -- To unsubscribe from th

[PATCH,v2 net] net: sched: validate that class is found in qdisc_tree_decrease_qlen

2015-07-20 Thread Alex Gartrell
fy is not necessary in this case, as the parent has already been deactivated anyway. Signed-off-by: Alex Gartrell --- net/sched/sch_api.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index f06aa01..46be5e5 100644 -

[PATCH net] net: sched: validate that class is found in qdisc_tree_decrease_qlen

2015-07-20 Thread Alex Gartrell
-> qdidsc_tree_decrease_qlen -> cl = htb_get # returns NULL, removed in htb_delete -> htb_qlen_notify(sch, NULL) # BOOM This patch checks cl for 0 before invoking qlen_notify and put. The notify is not necessary in this case, as the parent has already been deac

Re: [RGC PATCH v3.10] net: sched: validate that class is found in qdisc_tree_decrease_qlen

2015-07-17 Thread Alex Gartrell
te to note the invariant in the code i've changed with a WARN_ON and to skip it, and then to otherwise find a way to close the hole. Do you agree? -- Alex Gartrell -- 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

[RGC PATCH v3.10] net: sched: validate that class is found in qdisc_tree_decrease_qlen

2015-07-17 Thread Alex Gartrell
is not necessary in this case, as the parent has already been deactivated anyway. Signed-off-by: Alex Gartrell --- net/sched/sch_api.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 2d2f079..f5d48dd 100644 --- a/

Panic with demuxed ipv4 multicast udp sockets on 4.0.4

2015-07-10 Thread Alex Gartrell
0x0, rt6_next = 0x0, dn_next = 0x0 } } -- Alex Gartrell -- 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,v2 net-next] ipvs: skb_orphan in case of forwarding

2015-07-08 Thread Alex Gartrell
roblem. I'm pretty sure this isn't a problem in 3.4 or before. -- Alex Gartrell -- 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,v2 net-next] ipvs: skb_orphan in case of forwarding

2015-07-05 Thread Alex Gartrell
n't bisected it (not even sure my test would run on that code base). -- Alex Gartrell -- 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,v2 net-next] ipvs: skb_orphan in case of forwarding

2015-07-05 Thread Alex Gartrell
On Sun, Jul 5, 2015 at 3:13 PM, Julian Anastasov wrote: > May be the patch fixes crashes? If yes, Simon > should apply it for ipvs/net tree, otherwise after > the merge window... Yeah this is definitely a crash-fix and it's existed since at least 3.10. -- Alex G

[PATCH,v2 net-next] ipvs: skb_orphan in case of forwarding

2015-07-05 Thread Alex Gartrell
, skb_set_owner_w is totally broken for non full-socks. Signed-off-by: Alex Gartrell --- net/netfilter/ipvs/ip_vs_xmit.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c index bf66a86..99d4a41 100644

[PATCH net-next] ipvs: skb_orphan in case of forwarding

2015-07-05 Thread Alex Gartrell
, skb_set_owner_w is totally broken for non full-socks. Signed-off-by: Alex Gartrell --- net/netfilter/ipvs/ip_vs_xmit.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c index bf66a86..65526f4 100644

Re: [PATCH net-next] net: bail on sock_wfree, sock_rfree when we have a TCP_TIMEWAIT sk

2015-07-03 Thread Alex Gartrell
ote > real servers > - not likely for forward, nobody forwards traffic > destined to local IP to remote host What do you think of the following: commit f04c42f8041cc4ccc4cb2a30c1058136dd497a83 Author: Alex Gartrell Date: Wed Jul 1 13

Re: [PATCH net-next] net: bail on sock_wfree, sock_rfree when we have a TCP_TIMEWAIT sk

2015-07-02 Thread Alex Gartrell
On Thu, Jul 2, 2015 at 2:18 PM, Alex Gartrell wrote: > If early demux was enabled, we'd use the route from the socket Actually now that I think about it, this is probably broken, because we don't reply to the packet but instead silently drop it. -- Alex Gartrell http://vg

Re: [PATCH net-next] net: bail on sock_wfree, sock_rfree when we have a TCP_TIMEWAIT sk

2015-07-02 Thread Alex Gartrell
ould we just replicate this behavior in ipvs? if (!skb->dev && skb->sk) return NF_ACCEPT; -- Alex Gartrell -- 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: bail on sock_wfree, sock_rfree when we have a TCP_TIMEWAIT sk

2015-07-01 Thread Alex Gartrell
; } skb_set_owner_w sets sock_wfree. I'll figure out how to ensure that we're using an appropriate destructor here. Appreciate the patience! -- Alex Gartrell -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to m

[PATCH net-next] net: bail on sock_wfree, sock_rfree when we have a TCP_TIMEWAIT sk

2015-07-01 Thread Alex Gartrell
If we early-demux bind a TCP_TIMEWAIT socket to an skb and then orphan it (as we need to do in the ipvs forwarding case), sock_wfree and sock_rfree are going to reach into the inet_timewait_sock and mess with fields that don't exist. Signed-off-by: Alex Gartrell --- net/core/sock.

Re: [Intel-wired-lan] [PATCH 1/1] igb: Use ARRAY_SIZE instead fo sizeof(a)/sizeof(a[0])

2015-06-30 Thread Alex Gartrell
ur array to a pointer to an array (you'll get a build failure instead of 0). -- Alex Gartrell -- 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 RFC] net/unix: SO_REUSEPORT for AF_UNIX

2015-06-28 Thread Alex Gartrell
lly reuses a port completely takes over from the previous > listener. This is a really weird corner case from a user's perspective. I think sharing it is more reasonable, as you can always signal the other process out of band. -- Alex Gartrell -- To unsubscribe from this list: send t

We've released a generic netlink python library -- gnlpy

2015-05-20 Thread Alex Gartrell
k family. We welcome your pull requests :) -- Alex Gartrell -- 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