Re: [PATCH v3] tracepoint: Do not fail unregistering a probe due to memory allocation

2020-11-23 Thread Matt Mullins
Cc: Martin KaFai Lau > Cc: Song Liu > Cc: Yonghong Song > Cc: Andrii Nakryiko > Cc: John Fastabend > Cc: KP Singh > Cc: netdev > Cc: bpf > Cc: Kees Cook > Cc: Florian Weimer > Fixes: 97e1c18e8d17b ("tracing: Kernel Tracepoints") > Reported-by: syzbo

Re: [PATCH] bpf: don't fail kmalloc while releasing raw_tp

2020-11-17 Thread Matt Mullins
On Tue, Nov 17, 2020 at 06:05:51PM -0500, Mathieu Desnoyers wrote: > - On Nov 16, 2020, at 5:10 PM, rostedt rost...@goodmis.org wrote: > > > On Mon, 16 Nov 2020 16:34:41 -0500 (EST) > > Mathieu Desnoyers wrote: > > [...] > > >> I think you'll want a WRITE_ONCE(old[i].func, tp_stub_func) her

[PATCH] bpf: don't fail kmalloc while releasing raw_tp

2020-11-14 Thread Matt Mullins
...@syzkaller.appspotmail.com Signed-off-by: Matt Mullins --- I previously referenced a "pretty ugly" patch. This is not that one, because I don't think there's any way I can make the caller of ->release() actually handle errors like ENOMEM. It also looks like most of the other ways tracepoint_pro

Re: KASAN: vmalloc-out-of-bounds Read in bpf_trace_run3

2020-11-12 Thread Matt Mullins
> compiler: gcc (GCC) 10.1.0-syz 20200507 > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10f4b03250 > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1371a47c50 > > > > The issue was bisected to: > > > > com

[PATCH bpf-next v5 1/5] bpf: add writable context for raw tracepoints

2019-04-26 Thread Matt Mullins
written by the latter. Signed-off-by: Matt Mullins Acked-by: Yonghong Song --- include/linux/bpf.h | 2 ++ include/linux/bpf_types.h | 1 + include/linux/tracepoint-defs.h | 1 + include/trace/bpf_probe.h | 27 +-- include/uapi/linux/bpf.h

[PATCH bpf-next v4 4/5] tools: sync bpf.h

2019-04-24 Thread Matt Mullins
This adds BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE, and fixes up the error: enumeration value ‘BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE’ not handled in switch [-Werror=switch-enum] build errors it would otherwise cause in libbpf. Signed-off-by: Matt Mullins --- tools/include/uapi/linux

Re: [PATCH bpf-next v2] bpf: support raw tracepoints in modules

2018-12-13 Thread Matt Mullins
On Thu, 2018-12-13 at 19:22 +, Martin Lau wrote: > On Wed, Dec 12, 2018 at 04:42:37PM -0800, Matt Mullins wrote: > > Distributions build drivers as modules, including network and filesystem > > drivers which export numerous tracepoints. This enables > > bpf(BPF_RAW_TRACE

[PATCH bpf-next v2] bpf: support raw tracepoints in modules

2018-12-12 Thread Matt Mullins
Distributions build drivers as modules, including network and filesystem drivers which export numerous tracepoints. This enables bpf(BPF_RAW_TRACEPOINT_OPEN) to attach to those tracepoints. Signed-off-by: Matt Mullins --- v1->v2: * avoid taking the mutex in bpf_event_notify when op is neit

Re: [PATCH net] tls: don't use stack memory in a scatterlist

2018-05-17 Thread Matt Mullins
On Thu, 2018-05-17 at 14:50 -0400, David Miller wrote: > I'm surprised this problem wasn't discovered sooner. How exactly did you > discover it? Did you actually see it trigger or is this purely from code > inspection? Honestly, I'm not sure how it got uncovered, but it was observed at runtime.

[PATCH net] tls: don't use stack memory in a scatterlist

2018-05-16 Thread Matt Mullins
scatterlist code expects virt_to_page() to work, which fails with CONFIG_VMAP_STACK=y. Fixes: c46234ebb4d1e ("tls: RX path for ktls") Signed-off-by: Matt Mullins --- include/net/tls.h | 3 +++ net/tls/tls_sw.c | 9 - 2 files changed, 7 insertions(+), 5 deletions(-) di