All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: syzbot
	<syzbot+list0820d438c1905c75bc71@syzkaller.appspotmail.com>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com, bpf@vger.kernel.org
Subject: Re: [syzbot] Monthly trace report (May 2024)
Date: Sun, 2 Jun 2024 22:52:43 +0200	[thread overview]
Message-ID: <Zlzbm0rvNN9XY5v_@krava> (raw)
In-Reply-To: <20240602120950.8f08ef16ad9c485db374c08d@kernel.org>

On Sun, Jun 02, 2024 at 12:09:50PM +0900, Masami Hiramatsu wrote:
> On Thu, 30 May 2024 23:50:32 -0700
> syzbot <syzbot+list0820d438c1905c75bc71@syzkaller.appspotmail.com> wrote:
> 
> > Hello trace maintainers/developers,
> > 
> > This is a 31-day syzbot report for the trace subsystem.
> > All related reports/information can be found at:
> > https://syzkaller.appspot.com/upstream/s/trace
> > 
> > During the period, 1 new issues were detected and 0 were fixed.
> > In total, 10 issues are still open and 35 have been fixed so far.
> > 
> > Some of the still happening issues:
> > 
> > Ref Crashes Repro Title
> > <1> 705     Yes   WARNING in format_decode (3)
> >                   https://syzkaller.appspot.com/bug?extid=e2c932aec5c8a6e1d31c
> 
> Could you send this to bpf folks? It seems bpf_trace_printk caused this errror.
> (Maybe skipping fmt string check?)
> 
> > <2> 26      Yes   INFO: task hung in blk_trace_ioctl (4)
> >                   https://syzkaller.appspot.com/bug?extid=ed812ed461471ab17a0c
> 
> This looks like debugfs_mutex lock leakage. Need to rerun with lockdep.
> 
> > <3> 7       Yes   WARNING in get_probe_ref
> >                   https://syzkaller.appspot.com/bug?extid=8672dcb9d10011c0a160
> 
> Hm, fail on register_trace_block_rq_insert(). blktrace issue.
> 
> > <4> 6       Yes   INFO: task hung in blk_trace_remove (2)
> >                   https://syzkaller.appspot.com/bug?extid=2373f6be3e6de4f92562
> 
> This looks like debugfs_mutex lock leakage too.
> 
> > <5> 5       Yes   general protection fault in bpf_get_attach_cookie_tracing
> >                   https://syzkaller.appspot.com/bug?extid=3ab78ff125b7979e45f9
> 
> This is also BPF problem.

this one seems to be easy to fix, can't reproduce with either the change
below or with instrumenting __bpf_prog_test_run_raw_tp to set current->bpf_ctx
as in __bpf_trace_run

will send a patch

thanks,
jirka


---
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 593efccc2030..fc303c20f402 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -1148,6 +1148,8 @@ BPF_CALL_1(bpf_get_attach_cookie_trace, void *, ctx)
 {
 	struct bpf_trace_run_ctx *run_ctx;
 
+	if (!current->bpf_ctx)
+		return 0;
 	run_ctx = container_of(current->bpf_ctx, struct bpf_trace_run_ctx, run_ctx);
 	return run_ctx->bpf_cookie;
 }

  reply	other threads:[~2024-06-02 20:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31  6:50 [syzbot] Monthly trace report (May 2024) syzbot
2024-06-02  3:09 ` Masami Hiramatsu
2024-06-02 20:52   ` Jiri Olsa [this message]
2024-06-02 21:06     ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zlzbm0rvNN9XY5v_@krava \
    --to=olsajiri@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=syzbot+list0820d438c1905c75bc71@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.