public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Kees Cook <keescook@chromium.org>
Cc: Dmitry Vyukov <dvyukov@google.com>,
	syzbot <syzbot+352bd10e338d9a90e5e0@syzkaller.appspotmail.com>,
	Abderrahmane Benbachir <abderrahmane.benbachir@polymtl.ca>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	syzkaller-bugs <syzkaller-bugs@googlegroups.com>
Subject: Re: WARNING in event_function_local
Date: Tue, 12 Feb 2019 22:46:42 -0500	[thread overview]
Message-ID: <20190212224642.6a0a5360@vmware.local.home> (raw)
In-Reply-To: <CAGXu5j+Z=ns37DdNU-mYtfio1cW4c25jyAGwFx74YFXKM5SD1A@mail.gmail.com>

On Tue, 12 Feb 2019 19:40:12 -0800
Kees Cook <keescook@chromium.org> wrote:

 
> > > Steve, what could possibly be happening here? Just adding more
> > > tracepoints causes some kind of race where the task vs current test
> > > trips in event_function_local():
> > >
> > >                         if (WARN_ON_ONCE(task != current))
> > >                                 goto unlock;  
> >
> > That's perf code. How are you getting there? What's special about this
> > run? You have perf running?  
> 
> Yes, the reproducer is in an 8-way parallel tight loop, doing:
> 
>   fd = syscall(__NR_perf_event_open, 0x20000140, 0, 0, -1, 0);
>   syscall(__NR_ioctl, fd, 0x2402, 0x100000001);
> 
> I haven't decoded the structures that are passed in, but I'm at a loss
> for how changing how many trace entries there are could impact the
> race timing... O_o
> 
> > > Is this maybe just an unlucky condition with the event loop running in
> > > an IRQ? Should the WARN be expected, or is running under an IRQ
> > > unexpected?  
> 
> Is perf expected to fire during an IRQ? The task == current test seems
> suspicious if so...
> 

That's a question for Peter.

-- Steve

  reply	other threads:[~2019-02-13  3:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-27 19:58 WARNING in event_function_local syzbot
2018-05-10  5:18 ` Dmitry Vyukov
2019-02-13  1:27   ` Kees Cook
2019-02-13  2:14     ` Steven Rostedt
2019-02-13  3:40       ` Kees Cook
2019-02-13  3:46         ` Steven Rostedt [this message]
2019-02-13  9:51         ` Peter Zijlstra
2019-02-13  9:57           ` Peter Zijlstra
2019-02-13 10:16             ` Peter Zijlstra

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=20190212224642.6a0a5360@vmware.local.home \
    --to=rostedt@goodmis.org \
    --cc=abderrahmane.benbachir@polymtl.ca \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dvyukov@google.com \
    --cc=jolsa@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=syzbot+352bd10e338d9a90e5e0@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox