All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Vince Weaver <vincent.weaver@maine.edu>,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: perf_fuzzer crash on pentium 4
Date: Wed, 7 May 2014 22:00:50 -0400	[thread overview]
Message-ID: <20140508020050.GX39568@redhat.com> (raw)
In-Reply-To: <20140506202307.GA1458@moon>

On Wed, May 07, 2014 at 12:23:08AM +0400, Cyrill Gorcunov wrote:
> On Tue, May 06, 2014 at 11:42:58AM -0400, Vince Weaver wrote:
> > 
> > So just to be difficult I fired up the perf_fuzzer on a Pentium 4 machine.
> > 
> > It crashes more or less instantly (sorry for the line wrapping, 
> > just got the serial console hooked up and don't have minicom configured 
> > right yet).
> > 
> > this is 3.15-rc4 with the anti-memory corruption patch applied.
> > 
> > [   67.872274] BUG: unable to handle kernel NULL pointer dereference at 00000004
> > [   67.876146] IP: [<ffffffff81013df2>] p4_pmu_schedule_events+0xa5/0x331
> 
> This looks like
> 
> p4_pmu_schedule_events:
> 		...
> 		bind = p4_config_get_bind(hwc->config);
> 			returned bind = NULL;
> 		escr_idx = p4_get_escr_idx(bind->escr_msr[thread]); NULL deref
> 
> If i'm right (btw it's possible to use addr2line helper?) then hwc->config
> is corrupted and p4_config_get_bind returned nil simply because proper event
> was not found. And I don't understand how it could happen because before
> configuration gets written into hwc->config it's validated once obtained
> from user-space as a raw event. Weird...

I think my commit 13beacee817d27a40ffc6f065ea0042685611dd5 explains this
corruption.  Though I have to admit I haven't looked through the problem
very closely yet.

IOW my lazy fix in that commit doesn't cover fuzzers and the real problem
in p4_pmu_schedule_events. :-)

Cheers,
Don

  parent reply	other threads:[~2014-05-08  2:01 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-06 15:42 perf_fuzzer crash on pentium 4 Vince Weaver
2014-05-06 15:46 ` Peter Zijlstra
2014-05-06 15:49   ` Cyrill Gorcunov
2014-05-06 16:05     ` Vince Weaver
2014-05-06 16:06       ` Cyrill Gorcunov
2014-05-06 16:11   ` Vince Weaver
2014-05-06 16:16     ` Cyrill Gorcunov
2014-05-06 17:56       ` Vince Weaver
2014-05-06 20:23 ` Cyrill Gorcunov
2014-05-06 21:30   ` Vince Weaver
2014-05-06 21:46     ` Cyrill Gorcunov
2014-05-07 16:46       ` Vince Weaver
2014-05-07 16:49         ` Cyrill Gorcunov
2014-05-07 16:58           ` Cyrill Gorcunov
2014-05-07 17:07             ` Vince Weaver
2014-05-07 18:24               ` Cyrill Gorcunov
2014-05-07 21:17                 ` Vince Weaver
2014-05-07 21:51                   ` Cyrill Gorcunov
2014-05-07 21:54                     ` Cyrill Gorcunov
2014-05-08  5:14                       ` Vince Weaver
2014-05-08  5:40                         ` Cyrill Gorcunov
2014-05-08  2:00   ` Don Zickus [this message]
2014-05-08  5:38     ` Cyrill Gorcunov
2014-05-08  7:37     ` Cyrill Gorcunov
2014-05-08  7:49       ` Cyrill Gorcunov
2014-05-08  8:02         ` Cyrill Gorcunov
2014-05-09 16:19           ` Vince Weaver
2014-05-09 16:30             ` Cyrill Gorcunov
2014-05-14 20:39             ` Cyrill Gorcunov
2014-05-15  5:31               ` Vince Weaver
2014-05-15 22:09                 ` Cyrill Gorcunov
2014-05-28 13:56 ` Pavel Machek
2014-05-28 14:06   ` Cyrill Gorcunov
2014-05-28 15:20     ` Peter Zijlstra
2014-05-28 15:43       ` Cyrill Gorcunov

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=20140508020050.GX39568@redhat.com \
    --to=dzickus@redhat.com \
    --cc=gorcunov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=vincent.weaver@maine.edu \
    /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.