RE: [PATCH bpf-next] rethook: Remove warning messages printed for finding return address of a frame.

2024-04-03 Thread John Fastabend
ook_find_ret_addr(struct task_struct > *tsk, unsigned long frame > if (WARN_ON_ONCE(!cur)) > return 0; > > - if (WARN_ON_ONCE(tsk != current && task_is_running(tsk))) > + if (tsk != current && task_is_running(tsk)) > return 0; > > do { > -- > 2.34.1 > > Acked-by: John Fastabend

Re: [PATCH net-next v5] virtio_net: Support RX hash XDP hint

2024-02-26 Thread John Fastabend
Jason Wang wrote: > On Fri, Feb 23, 2024 at 9:42 AM Xuan Zhuo wrote: > > > > On Fri, 09 Feb 2024 13:57:25 +0100, Paolo Abeni wrote: > > > On Fri, 2024-02-09 at 18:39 +0800, Liang Chen wrote: > > > > On Wed, Feb 7, 2024 at 10:27 PM Paolo Abeni wrote: > > > > > > > > > > On Wed, 2024-02-07 at

RE: [syzbot] WARNING: refcount bug in sk_psock_get

2021-04-09 Thread John Fastabend
syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:9c54130c Add linux-next specific files for 20210406 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=17d8d7aad0 > kernel config:

RE: [syzbot] WARNING: suspicious RCU usage in tcp_bpf_update_proto

2021-04-06 Thread John Fastabend
syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:514e1150 net: x25: Queue received packets in the drivers i.. > git tree: net-next > console output: https://syzkaller.appspot.com/x/log.txt?x=112a8831d0 > kernel config:

RE: [PATCH bpf-next 2/3] libbpf: selftests: refactor 'BPF_PERCPU_TYPE()' and 'bpf_percpu()' macros

2021-04-05 Thread John Fastabend
Pedro Tammela wrote: > This macro was refactored out of the bpf selftests. > > Since percpu values are rounded up to '8' in the kernel, a careless > user in userspace might encounter unexpected values when parsing the > output of the batched operations. > > Now that both array and hash maps have

RE: [PATCH bpf-next 1/3] bpf: add batched ops support for percpu array

2021-04-05 Thread John Fastabend
Pedro Tammela wrote: > Suggested-by: Jamal Hadi Salim > Signed-off-by: Pedro Tammela > --- A commit message describing some of the change details and a note it uses the for-each cpu copies (same as normal syscall on percpu map) and not the per-cpu ones would be nice. I at least had to go and

RE: [PATCH v7 bpf-next 0/6] xsk: build skb by page (aka generic zerocopy xmit)

2021-02-17 Thread John Fastabend
75988 1600203 1440054 > page1974058 1953655 1945463 1904478 > percent 3.0%10.0% 21.58% 32.3% > For the series, but might be good to get Dave or Jakub to check 2/6 to be sure they agree. Acked-by: John Fastabend

Re: RE: [PATCH v7 bpf-next 6/6] xsk: build skb by page (aka generic zerocopy xmit)

2021-02-17 Thread John Fastabend
Xuan Zhuo wrote: > On Wed, 17 Feb 2021 16:46:04 -0800, John Fastabend > wrote: > > Alexander Lobakin wrote: > > > From: Xuan Zhuo > > > > > > This patch is used to construct skb based on page to save memory copy > > > overhead

RE: [PATCH v7 bpf-next 6/6] xsk: build skb by page (aka generic zerocopy xmit)

2021-02-17 Thread John Fastabend
Alexander Lobakin wrote: > From: Xuan Zhuo > > This patch is used to construct skb based on page to save memory copy > overhead. > > This function is implemented based on IFF_TX_SKB_NO_LINEAR. Only the > network card priv_flags supports IFF_TX_SKB_NO_LINEAR will use page to > directly construct

RE: [PATCH bpf-next v6 00/11] Atomics for eBPF

2021-01-14 Thread John Fastabend
Brendan Jackman wrote: > Happy new year everyone, and thanks once again for the reviews. > > There's still one unresolved review comment from John[3] but I don't > think it needs to block the patchset as it stands, it can be a > separate patch. Hope that's OK. Its ok on my side if it comes as a

RE: [PATCH bpf-next] xsk: build skb by page

2020-12-31 Thread John Fastabend
Xuan Zhuo wrote: > This patch is used to construct skb based on page to save memory copy > overhead. > > Taking into account the problem of addr unaligned, and the > possibility of frame size greater than page in the future. > > Signed-off-by: Xuan Zhuo > --- > net/xdp/xsk.c | 68 >

Re: [PATCH bpf-next v4 04/11] bpf: Rename BPF_XADD and prepare to encode other atomics in .imm

2020-12-08 Thread John Fastabend
Brendan Jackman wrote: > Hi John, thanks a lot for the reviews! > > On Mon, Dec 07, 2020 at 01:56:53PM -0800, John Fastabend wrote: > > Brendan Jackman wrote: > > > A subsequent patch will add additional atomic operations. These new > > > operations will use the

RE: [PATCH bpf-next v4 07/11] bpf: Add instructions for atomic_[cmp]xchg

2020-12-07 Thread John Fastabend
Brendan Jackman wrote: > This adds two atomic opcodes, both of which include the BPF_FETCH > flag. XCHG without the BPF_FETCH flag would naturally encode > atomic_set. This is not supported because it would be of limited > value to userspace (it doesn't imply any barriers). CMPXCHG without >

RE: [PATCH bpf-next v4 07/11] bpf: Add instructions for atomic_[cmp]xchg

2020-12-07 Thread John Fastabend
Brendan Jackman wrote: > This adds two atomic opcodes, both of which include the BPF_FETCH > flag. XCHG without the BPF_FETCH flag would naturally encode > atomic_set. This is not supported because it would be of limited > value to userspace (it doesn't imply any barriers). CMPXCHG without >

RE: [PATCH bpf-next v4 06/11] bpf: Add BPF_FETCH field / create atomic_fetch_add instruction

2020-12-07 Thread John Fastabend
Song > Signed-off-by: Brendan Jackman > --- I like Yonghong suggestion #define BPF_ATOMIC_FETCH_ADD(SIZE, DST, SRC, OFF) \ BPF_ATOMIC(SIZE, DST, SRC, OFF, BPF_ADD | BPF_FETCH) otherwise LGTM. One observation to consider below. Acked-by: John Fastabend > arch/x86

RE: [PATCH bpf-next v4 05/11] bpf: Move BPF_STX reserved field check into BPF_STX verifier code

2020-12-07 Thread John Fastabend
tions(+), 7 deletions(-) Acked-by: John Fastabend

RE: [PATCH bpf-next v4 04/11] bpf: Rename BPF_XADD and prepare to encode other atomics in .imm

2020-12-07 Thread John Fastabend
Brendan Jackman wrote: > A subsequent patch will add additional atomic operations. These new > operations will use the same opcode field as the existing XADD, with > the immediate discriminating different operations. > > In preparation, rename the instruction mode BPF_ATOMIC and start > calling

RE: [PATCH bpf-next v4 03/11] bpf: x86: Factor out a lookup table for some ALU opcodes

2020-12-07 Thread John Fastabend
igned-off-by: Brendan Jackman > --- Acked-byy: John Fastabend

RE: [PATCH bpf-next v4 02/11] bpf: x86: Factor out emission of REX byte

2020-12-07 Thread John Fastabend
Brendan Jackman wrote: > The JIT case for encoding atomic ops is about to get more > complicated. In order to make the review & resulting code easier, > let's factor out some shared helpers. > > Signed-off-by: Brendan Jackman > --- Acked-by: John Fastabend

RE: [PATCH bpf-next v4 01/11] bpf: x86: Factor out emission of ModR/M for *(reg + off)

2020-12-07 Thread John Fastabend
de-effect of other changes. > > Signed-off-by: Brendan Jackman > --- Small nit on style preference below. Acked-by: John Fastabend [...] > > @@ -1240,11 +1250,7 @@ st:if (is_imm8(insn->off)) > goto xadd; >

Re: [PATCH v2 bpf-next 00/13] Atomics for eBPF

2020-12-01 Thread John Fastabend
Andrii Nakryiko wrote: > On Tue, Dec 1, 2020 at 9:53 PM John Fastabend > wrote: > > > > Yonghong Song wrote: > > > > > > > > > > [...] > > > > > > Great, this means that all existing valid uses of > > > > __sync_fe

Re: [PATCH v2 bpf-next 00/13] Atomics for eBPF

2020-12-01 Thread John Fastabend
Yonghong Song wrote: > > [...] > > Great, this means that all existing valid uses of > > __sync_fetch_and_add() will generate BPF_XADD instructions and will > > work on old kernels, right? > > That is correct. > > > > > If that's the case, do we still need cpu=v4? The new instructions are >

Re: [PATCH v3] bpf: Fix unsigned 'datasec_id' compared with zero in check_pseudo_btf_id

2020-11-11 Thread John Fastabend
ixes coccicheck warning: > > > > ./kernel/bpf/verifier.c:9616:5-15: WARNING: Unsigned expression compared > > with zero: datasec_id > 0 > > > > Reported-by: Tosk Robot > > Signed-off-by: Kaixu Xia > > --- > > Looks good. > > Acked-by: Andrii Nakryiko > > [...] Acked-by: John Fastabend

Re: [PATCH v2 bpf] tools: bpftool: Add missing close before bpftool net attach exit

2020-11-11 Thread John Fastabend
wanghai (M) wrote: > > 在 2020/11/10 12:33, John Fastabend 写道: > > Wang Hai wrote: > >> progfd is created by prog_parse_fd(), before 'bpftool net attach' exit, > >> it should be closed. > >> > >> Fixes: 04949ccc273e ("tools: bpftool: ad

RE: [PATCH v2 bpf] tools: bpftool: Add missing close before bpftool net attach exit

2020-11-09 Thread John Fastabend
Wang Hai wrote: > progfd is created by prog_parse_fd(), before 'bpftool net attach' exit, > it should be closed. > > Fixes: 04949ccc273e ("tools: bpftool: add net attach command to attach XDP on > interface") > Signed-off-by: Wang Hai > --- > v1->v2: use cleanup tag instead of repeated closes >

Re: [PATCH] net/xdp: remove unused macro REG_STATE_NEW

2020-11-09 Thread John Fastabend
define REG_STATE_NEW0x0 > #define REG_STATE_REGISTERED 0x1 > #define REG_STATE_UNREGISTERED 0x2 > #define REG_STATE_UNUSED 0x3 I think having the define there makes it more readable and clear what the zero state is. But if we run with unused-macros I guess its even

Re: [PATCH bpf] tools: bpftool: Add missing close before bpftool net attach exit

2020-11-09 Thread John Fastabend
Michal Rostecki wrote: > On 11/9/20 8:04 AM, Wang Hai wrote: > > progfd is created by prog_parse_fd(), before 'bpftool net attach' exit, > > it should be closed. > > > > Fixes: 04949ccc273e ("tools: bpftool: add net attach command to attach XDP > > on interface") > > Signed-off-by: Wang Hai > >

RE: [PATCH] net: sched: fix misspellings using misspell-fixer tool

2020-11-09 Thread John Fastabend
pie.c:408 > > Fix typos found by misspell-fixer. > > Signed-off-by: Menglong Dong > --- Hi, you will want to add net-next to the [PATCH *] line next time to make it clear this is for net-next. The contents make it obvious in this case though. Also I'm not sure why the bpf@ include but OK. Acked-by: John Fastabend

RE: [PATCH v3 bpf] trace: bpf: Fix passing zero to PTR_ERR()

2020-11-09 Thread John Fastabend
_OR_NULL(*btf)) > - return PTR_ERR(*btf); > + return IS_ERR(*btf) ? PTR_ERR(*btf) : -EINVAL; > > if (ptr->type_id > 0) > *btf_id = ptr->type_id; > -- > 2.7.4 > Acked-by: John Fastabend

RE: [PATCH] bpf: remove duplicate include

2020-11-09 Thread John Fastabend
Wang Qing wrote: > Remove duplicate header which is included twice. > > Signed-off-by: Wang Qing > --- > kernel/bpf/btf.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c > index ed7d02e..6324de8 > --- a/kernel/bpf/btf.c > +++ b/kernel/bpf/btf.c > @@

RE: [PATCH] samples/bpf: remove duplicate include

2020-11-08 Thread John Fastabend
menglong8.dong@ wrote: > From: Menglong Dong > > Obviously, 'bpf/bpf.h' in 'samples/bpf/hbm.c' is duplicated. > > Signed-off-by: Menglong Dong > --- Acked-by: John Fastabend

Re: [PATCH bpf-next v2 7/8] bpf: Add tests for task_local_storage

2020-11-03 Thread John Fastabend
Alexei Starovoitov wrote: > On Tue, Nov 3, 2020 at 5:55 PM KP Singh wrote: > > > > [...] > > > > > > > > > > I saw the docs mention that these are not exposed to tracing programs > > > > due to > > > > insufficient preemption checks. Do you think it would be okay to allow > > > > them > > > >

Re: [PATCH] net: sockmap: Don't call bpf_prog_put() on NULL pointer

2020-10-14 Thread John Fastabend
dict, verdict, and empty. Where empty is just used for redirects or other socket account tricks. Just something to keep in mind. Acked-by: John Fastabend

RE: [PATCH bpf] bpf: sockmap: add locking annotations to iterator

2020-10-12 Thread John Fastabend
> I couldn't find any guidance which one is preferred, so I used > what is easier to type out. > > Fixes: 0365351524d7 ("net: Allow iterating sockmap and sockhash") > Reported-by: kernel test robot > Signed-off-by: Lorenz Bauer > --- LGTM Acked-by: John Fastabend

Re: Packet gets stuck in NOLOCK pfifo_fast qdisc

2020-09-10 Thread John Fastabend
Cong Wang wrote: > On Thu, Sep 3, 2020 at 10:08 PM John Fastabend > wrote: > > Maybe this would unlock us, > > > > diff --git a/net/core/dev.c b/net/core/dev.c > > index 7df6c9617321..9b09429103f1 100644 > > --- a/net/core/dev.c > > +++ b/net/core/dev

Re: Packet gets stuck in NOLOCK pfifo_fast qdisc

2020-09-03 Thread John Fastabend
Cong Wang wrote: > On Thu, Sep 3, 2020 at 1:40 AM Paolo Abeni wrote: > > > > On Wed, 2020-09-02 at 22:01 -0700, Cong Wang wrote: > > > Can you test the attached one-line fix? I think we are overthinking, > > > probably all > > > we need here is a busy wait. > > > > I think that will solve, but I

Re: [PATCH net-next] net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc

2020-09-03 Thread John Fastabend
Cong Wang wrote: > On Wed, Sep 2, 2020 at 7:22 PM Yunsheng Lin wrote: > > > > On 2020/9/3 9:48, Cong Wang wrote: > > > On Wed, Sep 2, 2020 at 6:22 PM Yunsheng Lin > > > wrote: > > >> > > >> On 2020/9/3 8:35, Cong Wang wrote: > > >>> On Tue, Sep 1, 2020 at 11:35 PM Yunsheng Lin > > >>> wrote:

RE: [PATCH bpf-next 5/6] bpf: sockmap: allow update from BPF

2020-08-19 Thread John Fastabend
John Fastabend wrote: > Lorenz Bauer wrote: > > Allow calling bpf_map_update_elem on sockmap and sockhash from a BPF > > context. The synchronization required for this is a bit fiddly: we > > need to prevent the socket from changing it's state while we add it > > to

RE: [PATCH bpf-next 5/6] bpf: sockmap: allow update from BPF

2020-08-19 Thread John Fastabend
Lorenz Bauer wrote: > Allow calling bpf_map_update_elem on sockmap and sockhash from a BPF > context. The synchronization required for this is a bit fiddly: we > need to prevent the socket from changing it's state while we add it > to the sockmap, since we rely on getting a callback via >

RE: [PATCH bpf-next 4/6] bpf: override the meaning of ARG_PTR_TO_MAP_VALUE for sockmap and sockhash

2020-08-19 Thread John Fastabend
Lorenz Bauer wrote: > The verifier assumes that map values are simple blobs of memory, and > therefore treats ARG_PTR_TO_MAP_VALUE, etc. as such. However, there are > map types where this isn't true. For example, sockmap and sockhash store > sockets. In general this isn't a big problem: we can

RE: [PATCH bpf-next 3/6] bpf: sockmap: call sock_map_update_elem directly

2020-08-19 Thread John Fastabend
pdate_elem and rename the function to > sock_map_update_elem_sys. > > Signed-off-by: Lorenz Bauer > --- Acked-by: John Fastabend

RE: [PATCH bpf-next 2/6] bpf: sockmap: merge sockmap and sockhash update functions

2020-08-19 Thread John Fastabend
eletions(-) > Fixup the warning, but otherwise Acked-by: John Fastabend

RE: [PATCH bpf-next 1/6] net: sk_msg: simplify sk_psock initialization

2020-08-19 Thread John Fastabend
for sockmap. > > Signed-off-by: Lorenz Bauer > --- Looks like a nice bit of cleanup thanks. I think we might be able to fold up more of this code as well, but I'll take a look in a bit. Acked-by: John Fastabend

RE: [PATCH] kprobes: fix compiler warning for !CONFIG_KPROBES_ON_FTRACE

2020-08-05 Thread John Fastabend
xes: 0cb2f1372baa ("kprobes: Fix NULL pointer dereference at > kprobe_ftrace_handler") > Signed-off-by: Muchun Song > --- Acked-by: John Fastabend

Re: BUG: unable to handle kernel NULL pointer dereference in bpf_prog_ADDR

2020-08-02 Thread John Fastabend
Eric Dumazet wrote: > > > On 8/2/20 3:45 PM, syzbot wrote: > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit:ac3a0c84 Merge git://git.kernel.org/pub/scm/linux/kernel/g.. > > git tree: upstream > > console output:

Re: [PATCH] tools/bpf/bpftool: Fix wrong return value in do_dump()

2020-08-02 Thread John Fastabend
quot;) > > Cc: Andrii Nakryiko > > Signed-off-by: Tianjia Zhang > > --- > > > Acked-by: Andrii Nakryiko > Acked-by: John Fastabend

Re: [PATCH bpf 1/2] flow_dissector: reject invalid attach_flags

2020-06-17 Thread John Fastabend
Alexei Starovoitov wrote: > On Tue, Jun 16, 2020 at 1:30 AM Lorenz Bauer wrote: > > > > On Tue, 16 Jun 2020 at 04:55, Alexei Starovoitov > > wrote: > > > > > > On Mon, Jun 15, 2020 at 7:43 AM Lorenz Bauer wrote: > > > > > > > > On Fri, 12 Jun 2020 at 23:36, Alexei Starovoitov > > > > wrote: >

RE: [PATCH] [bpf] xdp_redirect_cpu_user: Fix null pointer dereference

2020-06-16 Thread John Fastabend
emset(rec, 0, size); > + rec = calloc(n_cpus + 1, sizeof(struct record)); > if (!rec) { > fprintf(stderr, "Mem alloc error\n"); > exit(EXIT_FAIL_MEM); > -- > 2.17.1 > Acked-by: John Fastabend

RE: [PATCH] [bpf] xdp_monitor_user: Fix null pointer dereference

2020-06-16 Thread John Fastabend
/* Alloc main stats_record structure */ > - rec = malloc(sizeof(*rec)); > - memset(rec, 0, sizeof(*rec)); > + rec = calloc(1, sizeof(*rec)); > if (!rec) { > fprintf(stderr, "Mem alloc error\n"); > exit(EXIT_FAIL_MEM); > -- > 2.17.1 > Acked-by: John Fastabend

Re: [PATCH] xdp_rxq_info_user: Fix null pointer dereference. Replace malloc/memset with calloc.

2020-06-12 Thread John Fastabend
h a calloc() > > > > Fixes: 0fca931a6f21 ("samples/bpf: program demonstrating access to > > xdp_rxq_info") > > Signed-off-by: Gaurav Singh > > Acked-by: Jesper Dangaard Brouer > Acked-by: John Fastabend

Re: [PATCH bpf] bpf: sockmap: don't attach programs to UDP sockets

2020-06-12 Thread John Fastabend
gt; } > > > > +static bool sock_map_redirect_allowed(const struct sock *sk) > > +{ > > + return sk_is_tcp(sk) && sk->sk_state != TCP_LISTEN; > > +} > > + > > static bool sock_map_sk_is_suitable(const struct sock *sk) > > { > > return sk_is_tcp(sk) || sk_is_udp(sk); > > Acked-by: Jakub Sitnicki Thanks. Acked-by: John Fastabend

RE: [PATCH] bpf/sockmap: fix kernel panic at __tcp_bpf_recvmsg

2020-05-26 Thread John Fastabend
uct sk_msg, list)) > +break; Thanks. Change looks good but spacing is a bit off . Can we turn those spaces into tabs? Otherwise adding fixes tag and my ack would be great. Fixes: 02c558b2d5d67 ("bpf: sockmap, support for msg_peek in sk_msg with redirect ingress") Acked-by: John Fastabend

Re: [PATCH v2] netprio_cgroup: Fix unlimited memory leak of v2 cgroups

2020-05-21 Thread John Fastabend
Jakub Kicinski wrote: > On Fri, 8 May 2020 22:58:29 -0700 Jakub Kicinski wrote: > > On Sat, 9 May 2020 11:32:10 +0800 Zefan Li wrote: > > > If systemd is configured to use hybrid mode which enables the use of > > > both cgroup v1 and v2, systemd will create new cgroup on both the default > > >

RE: [PATCH 1/1] bpf: Fix bpf_event_output re-entry issue

2019-09-26 Thread John Fastabend
8cd00 ("bpf: add perf event notificaton support for sock_ops") > > Effort: BPF > Signed-off-by: Allan Zhang > Reviewed-by: Stanislav Fomichev > Reviewed-by: Eric Dumazet > --- LGTM thanks. Acked-by: John Fastabend

Re: general protection fault in tls_sk_proto_close (2)

2019-08-29 Thread John Fastabend
Jakub Kicinski wrote: > On Thu, 29 Aug 2019 11:48:32 -0700, John Fastabend wrote: > > Jakub Kicinski wrote: > > > On Thu, 29 Aug 2019 11:52:00 +0800, Hillf Danton wrote: > > > > Alternatively work is done if sock is closed again. Anyway ctx is reset > > >

Re: general protection fault in tls_sk_proto_close (2)

2019-08-29 Thread John Fastabend
Jakub Kicinski wrote: > On Thu, 29 Aug 2019 11:52:00 +0800, Hillf Danton wrote: > > Alternatively work is done if sock is closed again. Anyway ctx is reset > > under sock's callback lock in write mode. > > > > --- a/net/tls/tls_main.c > > +++ b/net/tls/tls_main.c > > @@ -295,6 +295,8 @@ static

Re: general protection fault in tls_write_space

2019-08-13 Thread John Fastabend
Jakub Kicinski wrote: > On Tue, 13 Aug 2019 11:30:00 -0700, John Fastabend wrote: > > Jakub Kicinski wrote: > > > On Tue, 13 Aug 2019 10:17:06 -0700, John Fastabend wrote: > > > > > Followup of commit 95fa145479fb > > > > >

Re: general protection fault in tls_write_space

2019-08-13 Thread John Fastabend
Jakub Kicinski wrote: > On Tue, 13 Aug 2019 10:17:06 -0700, John Fastabend wrote: > > > Followup of commit 95fa145479fb > > > ("bpf: sockmap/tls, close can race with map free") > > > > > > --- a/net/tls/tls_main.c > > > +++

Re: general protection fault in tls_write_space

2019-08-13 Thread John Fastabend
Hillf Danton wrote: > > On Sat, 10 Aug 2019 01:23:06 -0700 > > > > syzbot has found a reproducer for the following crash on: > > > > HEAD commit:ca497fb6 taprio: remove unused variable 'entry_list_policy' > > git tree: net-next > > console output:

Re: BUG: spinlock recursion in release_sock

2019-07-25 Thread John Fastabend
syzbot wrote: > syzbot has bisected this bug to: > > commit 8822e270d697010e6a4fd42a319dbefc33db91e1 > Author: John Hurley > Date: Sun Jul 7 14:01:54 2019 + > > net: core: move push MPLS functionality from OvS to core helper > > bisection log:

Re: kernel panic: stack is corrupted in pointer

2019-07-23 Thread John Fastabend
Dmitry Vyukov wrote: > On Wed, Jul 17, 2019 at 10:58 AM syzbot > wrote: > > > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:1438cde7 Add linux-next specific files for 20190716 > > git tree: linux-next > > console output:

Re: WARNING in mark_lock

2019-07-08 Thread John Fastabend
syzbot wrote: > Hello, > > syzbot has tested the proposed patch but the reproducer still triggered > crash: > KASAN: use-after-free Read in class_equal > > == > BUG: KASAN: use-after-free in class_equal+0x40/0x50 >

Re: kernel panic: corrupted stack end in dput

2019-07-03 Thread John Fastabend
Eric Biggers wrote: > [+bpf and tls maintainers] > > On Wed, Jul 03, 2019 at 04:23:34PM +0100, Al Viro wrote: > > On Wed, Jul 03, 2019 at 03:40:00PM +0100, Al Viro wrote: > > > On Wed, Jul 03, 2019 at 02:43:07PM +0800, Hillf Danton wrote: > > > > > > > > This is very much *NOT* fine. > > > > >

RE: [net/bpf] Re: WARNING in mark_lock

2019-06-30 Thread John Fastabend
Eric Biggers wrote: > [+bpf list] > > On Tue, Jun 25, 2019 at 08:20:56AM +0200, Thomas Gleixner wrote: > > On Mon, 24 Jun 2019, syzbot wrote: > > > > > Hello, > > > > CC++ Peterz > > > > > > > > syzbot found the following crash on: > > > > > > HEAD commit:dc636f5d Add linux-next

RE: memory leak in create_ctx

2019-06-30 Thread John Fastabend
syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:79c3ba32 Merge tag 'drm-fixes-2019-06-07-1' of git://anong.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=170e0bfea0 > kernel config:

Re: KASAN: slab-out-of-bounds Write in validate_chain

2019-06-26 Thread John Fastabend
Eric Biggers wrote: > Hi John, > > On Tue, Jun 25, 2019 at 04:07:00PM -0700, syzbot wrote: > > syzbot has bisected this bug to: > > > > commit e9db4ef6bf4ca9894bb324c76e01b8f1a16b2650 > > Author: John Fastabend > > Date: Sat Jun 30 13:17:47 2018 +

RE: kernel panic: corrupted stack end in corrupted

2019-06-20 Thread John Fastabend
t; The bug was bisected to: > > commit e9db4ef6bf4ca9894bb324c76e01b8f1a16b2650 > Author: John Fastabend > Date: Sat Jun 30 13:17:47 2018 + > > bpf: sockhash fix omitted bucket lock in sock_close > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=135e8a3aa0

Re: memory leak in create_ctx

2019-06-13 Thread John Fastabend
Hillf Danton wrote: > > Hi Dmitry > > On Tue, 11 Jun 2019 19:45:28 +0800 Dmitry Vyukov wrote: > > > > I've run the repro as "./syz-execprog -repeat=0 -procs=6 repro" and > > in 10 mins I got the following splat, which indeed suggests a bpf bug. > > But we of course can have both bpf stack

Re: [PATCH 1/2] bpf: sockmap, fix uninitialized variable

2018-05-17 Thread John Fastabend
fix would be to always 'return 0' at the end of the function, but I think its probably better to init err here like above. Acked-by: John Fastabend <john.fastab...@gmail.com>

Re: [PATCH 1/2] bpf: sockmap, fix uninitialized variable

2018-05-17 Thread John Fastabend
path to hit this case is to add a sock to a map (without a BPF program) where the sock already has been added to another map. I don't have any tests for the case with socks in multiple maps so I'll add some to the selftests so I remember this case. The alternative fix would be to always 'return 0'

Re: [PATCH 2/2] bpf: sockmap, fix double-free

2018-05-17 Thread John Fastabend
This can happen when a user tries to add a kTLS socket to a sockmap. We need to add some tests for kTLS + sockmap cases. Acked-by: John Fastabend <john.fastab...@gmail.com>

Re: [PATCH 2/2] bpf: sockmap, fix double-free

2018-05-17 Thread John Fastabend
ries to add a kTLS socket to a sockmap. We need to add some tests for kTLS + sockmap cases. Acked-by: John Fastabend

Re: [bug, bisected] pfifo_fast causes packet reordering

2018-03-24 Thread John Fastabend
On 03/22/2018 03:16 AM, Jakob Unterwurzacher wrote: > On 21.03.18 21:52, John Fastabend wrote: >> Can you try this, >> >> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h >> index d4907b5..1e596bd 100644 >> --- a/include/net/sch_generic.h &

Re: [bug, bisected] pfifo_fast causes packet reordering

2018-03-24 Thread John Fastabend
On 03/22/2018 03:16 AM, Jakob Unterwurzacher wrote: > On 21.03.18 21:52, John Fastabend wrote: >> Can you try this, >> >> diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h >> index d4907b5..1e596bd 100644 >> --- a/include/net/sch_generic.h &

Re: [bug, bisected] pfifo_fast causes packet reordering

2018-03-21 Thread John Fastabend
On 03/21/2018 12:44 PM, Jakob Unterwurzacher wrote: > On 21.03.18 19:43, John Fastabend wrote: >> Thats my theory at least. Are you able to test a patch if I generate >> one to fix this? > > Yes, no problem. Can you try this, diff --git a/include/net/sch_generic.h b/incl

Re: [bug, bisected] pfifo_fast causes packet reordering

2018-03-21 Thread John Fastabend
On 03/21/2018 12:44 PM, Jakob Unterwurzacher wrote: > On 21.03.18 19:43, John Fastabend wrote: >> Thats my theory at least. Are you able to test a patch if I generate >> one to fix this? > > Yes, no problem. Can you try this, diff --git a/include/net/sch_generic.h b/incl

Re: [bug, bisected] pfifo_fast causes packet reordering

2018-03-21 Thread John Fastabend
On 03/21/2018 03:01 AM, Jakob Unterwurzacher wrote: > On 16.03.18 11:26, Jakob Unterwurzacher wrote: >> On 15.03.18 23:30, John Fastabend wrote: >>>> I have reproduced it using two USB network cards connected to each other. >>>> The test tool sends UDP packets

Re: [bug, bisected] pfifo_fast causes packet reordering

2018-03-21 Thread John Fastabend
On 03/21/2018 03:01 AM, Jakob Unterwurzacher wrote: > On 16.03.18 11:26, Jakob Unterwurzacher wrote: >> On 15.03.18 23:30, John Fastabend wrote: >>>> I have reproduced it using two USB network cards connected to each other. >>>> The test tool sends UDP packets

Re: [bug, bisected] pfifo_fast causes packet reordering

2018-03-15 Thread John Fastabend
On 03/15/2018 11:08 AM, Jakob Unterwurzacher wrote: > On 14.03.18 05:03, John Fastabend wrote: >> On 03/13/2018 11:35 AM, Dave Taht wrote: >>> On Tue, Mar 13, 2018 at 11:24 AM, Jakob Unterwurzacher >>> <jakob.unterwurzac...@theobroma-systems.com> wrote: >>

Re: [bug, bisected] pfifo_fast causes packet reordering

2018-03-15 Thread John Fastabend
On 03/15/2018 11:08 AM, Jakob Unterwurzacher wrote: > On 14.03.18 05:03, John Fastabend wrote: >> On 03/13/2018 11:35 AM, Dave Taht wrote: >>> On Tue, Mar 13, 2018 at 11:24 AM, Jakob Unterwurzacher >>> wrote: >>>> During stress-testing our "uca

Re: [bug, bisected] pfifo_fast causes packet reordering

2018-03-13 Thread John Fastabend
e_ops.ndo_start_xmit() function gets the packets >> handed over in the wrong order. >> >> This behavior was not observed on Linux v4.15 and I have bisected the >> problem down to this patch: >> >>> commit c5ad119fb6c09b0297446be05bd66602fa564758 >>>

Re: [bug, bisected] pfifo_fast causes packet reordering

2018-03-13 Thread John Fastabend
t;> handed over in the wrong order. >> >> This behavior was not observed on Linux v4.15 and I have bisected the >> problem down to this patch: >> >>> commit c5ad119fb6c09b0297446be05bd66602fa564758 >>> Author: John Fastabend >>> Date: Thu Dec

Re: [PATCH net-next 06/12] Revert "net: ptr_ring: otherwise safe empty checks can overrun array bounds"

2018-01-25 Thread John Fastabend
ssed to kmalloc(). > > kmalloc then returns ZERO_SIZE_PTR with a subsequent crash. > > Reported-by: syzbot+87678bcf753b44c39...@syzkaller.appspotmail.com > Cc: John Fastabend <john.fastab...@gmail.com> > Signed-off-by: Michael S. Tsirkin <m...@redhat.com> > --- Dang, I mis

Re: [PATCH net-next 06/12] Revert "net: ptr_ring: otherwise safe empty checks can overrun array bounds"

2018-01-25 Thread John Fastabend
ssed to kmalloc(). > > kmalloc then returns ZERO_SIZE_PTR with a subsequent crash. > > Reported-by: syzbot+87678bcf753b44c39...@syzkaller.appspotmail.com > Cc: John Fastabend > Signed-off-by: Michael S. Tsirkin > --- Dang, I missed this case. Thanks. Acked-by: John Fastabe

Re: [PATCH net-next 01/12] ptr_ring: keep consumer_head valid at all times

2018-01-25 Thread John Fastabend
nux/ptr_ring.h | 25 - > 1 file changed, 16 insertions(+), 9 deletions(-) > Thanks for fixing this up. Acked-by: John Fastabend <john.fastab...@gmail.com>

Re: [PATCH net-next 01/12] ptr_ring: keep consumer_head valid at all times

2018-01-25 Thread John Fastabend
+++- > 1 file changed, 16 insertions(+), 9 deletions(-) > Thanks for fixing this up. Acked-by: John Fastabend

Re: [PATCH] ptr_ring: document usage around __ptr_ring_peek

2018-01-10 Thread John Fastabend
Yep, thanks for following up. Acked-by: John Fastabend <john.fastab...@gmail.com>

Re: [PATCH] ptr_ring: document usage around __ptr_ring_peek

2018-01-10 Thread John Fastabend
following up. Acked-by: John Fastabend

Re: WARNING in strp_data_ready

2017-10-30 Thread John Fastabend
On 10/24/2017 08:20 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on 73d3393ada4f70fa3df5639c8d438f2f034c0ecb > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is attached. >

Re: WARNING in strp_data_ready

2017-10-30 Thread John Fastabend
On 10/24/2017 08:20 AM, syzbot wrote: > Hello, > > syzkaller hit the following crash on 73d3393ada4f70fa3df5639c8d438f2f034c0ecb > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is attached. >

Re: [PATCH net 3/3] bpf: do not test for PCPU_MIN_UNIT_SIZE before percpu allocations

2017-10-17 Thread John Fastabend
uld work, so > no changes needed to their actual __alloc_percpu_gfp() calls > which use the flag already. > > Signed-off-by: Daniel Borkmann <dan...@iogearbox.net> > --- Nice cleanup. Thanks! Acked-by: John Fastabend <john.fastab...@gmail.com>

Re: [PATCH net 3/3] bpf: do not test for PCPU_MIN_UNIT_SIZE before percpu allocations

2017-10-17 Thread John Fastabend
uld work, so > no changes needed to their actual __alloc_percpu_gfp() calls > which use the flag already. > > Signed-off-by: Daniel Borkmann > --- Nice cleanup. Thanks! Acked-by: John Fastabend

Re: [PATCH net 2/3] bpf: fix splat for illegal devmap percpu allocation

2017-10-17 Thread John Fastabend
ark.rutl...@arm.com> > Reported-by: Shankara Pailoor <sp3...@columbia.edu> > Reported-by: Richard Weinberger <rich...@nod.at> > Signed-off-by: Daniel Borkmann <dan...@iogearbox.net> > Cc: John Fastabend <john.fastab...@gmail.com> > --- Thanks! Acked-by: John Fastabend <john.fastab...@gmail.com>

Re: [PATCH net 2/3] bpf: fix splat for illegal devmap percpu allocation

2017-10-17 Thread John Fastabend
> Reported-by: Shankara Pailoor > Reported-by: Richard Weinberger > Signed-off-by: Daniel Borkmann > Cc: John Fastabend > --- Thanks! Acked-by: John Fastabend

Re: [PATCH] bpf: devmap: Check attr->max_entries more carefully

2017-10-16 Thread John Fastabend
On 10/15/2017 03:13 PM, Richard Weinberger wrote: > Am Montag, 16. Oktober 2017, 00:00:20 CEST schrieb Richard Weinberger: >> max_entries is user controlled and used as input for __alloc_percpu(). >> This function expects that the allocation size is a power of two and >> less than

Re: [PATCH] bpf: devmap: Check attr->max_entries more carefully

2017-10-16 Thread John Fastabend
On 10/15/2017 03:13 PM, Richard Weinberger wrote: > Am Montag, 16. Oktober 2017, 00:00:20 CEST schrieb Richard Weinberger: >> max_entries is user controlled and used as input for __alloc_percpu(). >> This function expects that the allocation size is a power of two and >> less than

Re: [PATCH net-next 3/3] virtio-net: support XDP_REDIRECT

2017-09-20 Thread John Fastabend
On 09/19/2017 02:42 AM, Jason Wang wrote: > This patch tries to add XDP_REDIRECT for virtio-net. The changes are > not complex as we could use exist XDP_TX helpers for most of the > work. The rest is passing the XDP_TX to NAPI handler for implementing > batching. > >

Re: [PATCH net-next 3/3] virtio-net: support XDP_REDIRECT

2017-09-20 Thread John Fastabend
On 09/19/2017 02:42 AM, Jason Wang wrote: > This patch tries to add XDP_REDIRECT for virtio-net. The changes are > not complex as we could use exist XDP_TX helpers for most of the > work. The rest is passing the XDP_TX to NAPI handler for implementing > batching. > > Cc: John F

Re: [PATCH][net-next][V3] bpf: test_maps: fix typos, "conenct" and "listeen"

2017-08-30 Thread John Fastabend
ann for spotting one of these mistakes > > Signed-off-by: Colin Ian King <colin.k...@canonical.com> > --- Thanks. Even though its a spelling typo best to add fixes tag I think. Fixes: 6f6d33f3b3d0 ("bpf: selftests add sockmap tests") Acked-by: John Fastabend <john.fastab...@gmail.com>

Re: [PATCH][net-next][V3] bpf: test_maps: fix typos, "conenct" and "listeen"

2017-08-30 Thread John Fastabend
akes > > Signed-off-by: Colin Ian King > --- Thanks. Even though its a spelling typo best to add fixes tag I think. Fixes: 6f6d33f3b3d0 ("bpf: selftests add sockmap tests") Acked-by: John Fastabend

  1   2   3   >