From: Fengguang Wu <fengguang.wu@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Jet Chen <jet.chen@intel.com>, Su Tao <tao.su@intel.com>,
Yuanhan Liu <yuanhan.liu@intel.com>, LKP <lkp@01.org>,
linux-kernel@vger.kernel.org
Subject: Re: [perf] BUG: unable to handle kernel NULL pointer dereference at 00000085
Date: Tue, 7 Oct 2014 12:56:33 +0800 [thread overview]
Message-ID: <20141007045633.GA17972@wfg-t540p.sh.intel.com> (raw)
In-Reply-To: <20141004172456.GA7509@worktop.ger.corp.intel.com>
Hi Peter,
On Sat, Oct 04, 2014 at 07:24:56PM +0200, Peter Zijlstra wrote:
> On Sat, Oct 04, 2014 at 09:46:22PM +0800, Fengguang Wu wrote:
> > Hi Peter,
> >
> > 0day kernel testing robot got the below dmesg and the first bad commit is
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/core
> >
> > commit a54b3e27e27c1bb6d2610eade895c04934c2667e
> > Author: Peter Zijlstra <peterz@infradead.org>
> > AuthorDate: Wed Sep 24 13:48:42 2014 +0200
> > Commit: Peter Zijlstra <peterz@infradead.org>
> > CommitDate: Thu Oct 2 23:11:50 2014 +0200
> >
> > perf: improve perf_sample_data struct layout
> >
> > This patch reorders fields in the perf_sample_data
> > struct in order to minimize the number of cachelines
> > touched in perf_sample_data_init(). It also removes
> > some intializations which are redundant with the
> > code in kernel/events/core.c
> >
> > Cc: mingo@elte.hu
> > Cc: ak@linux.intel.com
> > Cc: jolsa@redhat.com
> > Cc: acme@redhat.com
> > Cc: cebbert.lkml@gmail.com
> > Cc: peterz@infradead.org
> >
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> > Link: http://lkml.kernel.org/r/1411559322-16548-7-git-send-email-eranian@google.com
> >
>
> > [ 267.547006] debug: unmapping init [mem 0xc28f9000-0xc2b03fff]
> > [ 267.694378] random: init urandom read with 4 bits of entropy available
> > [ 279.465522] sock: process `trinity-main' is using obsolete setsockopt SO_BSDCOMPAT
> > [ 285.269144] BUG: unable to handle kernel NULL pointer dereference at 00000085
> > [ 285.273002] IP: [<c11259a1>] perf_prepare_sample+0x33e/0x496
> > [ 285.276062] *pde = 00000000
> > [ 285.279106] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
> > [ 285.279106] Modules linked in:
> > [ 285.279106] CPU: 1 PID: 1583 Comm: trinity-main Not tainted 3.17.0-rc4-00210-ga54b3e2 #1
> > [ 285.279106] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
> > [ 285.279106] task: c9475e80 ti: c9670000 task.ti: c9670000
> > [ 285.279106] EIP: 0060:[<c11259a1>] EFLAGS: 00010046 CPU: 1
> > [ 285.279106] EIP is at perf_prepare_sample+0x33e/0x496
> > [ 285.279106] EAX: 00000000 EBX: 00000000 ECX: 00000049 EDX: 00000000
> > [ 285.279106] ESI: cfd71c40 EDI: cfd71b84 EBP: cfd71b58 ESP: cfd71b34
> > [ 285.279106] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> > [ 285.279106] CR0: 80050033 CR2: 00000085 CR3: 095b4000 CR4: 000006d0
> > [ 285.279106] DR0: 41000043 DR1: 00000000 DR2: 00000000 DR3: 00000000
> > [ 285.279106] DR6: ffff0ff0 DR7: 00010602
>
> Could you try the below patch to confirm it works?
Yes, it fixes the BUG at perf_prepare_sample().
Tested-by: Fengguang Wu <fengguang.wu@intel.com>
The below table shows the details, in which a5679078d6 = a54b3e27e2 + your_fix.
+-------------------------------------------------------+------------+------------+
| | a54b3e27e2 | a5679078d6 |
+-------------------------------------------------------+------------+------------+
| boot_successes | 227 | 963 |
| boot_failures | 73 | 37 |
| BUG:kernel_boot_hang | 52 | 13 |
| BUG:unable_to_handle_kernel | 4 | |
| Oops | 4 | |
| EIP_is_at_perf_prepare_sample | 4 | |
| Kernel_panic-not_syncing:Fatal_exception_in_interrupt | 3 | |
| backtrace:iterate_dir | 2 | |
| backtrace:SyS_getdents64 | 2 | |
| WARNING:at_fs/proc/generic.c:remove_proc_entry() | 8 | 18 |
| backtrace:cleanup_net | 8 | 18 |
| backtrace:do_sys_open | 1 | |
| backtrace:SyS_openat | 1 | |
| BUG:kernel_test_crashed | 9 | 4 |
| backtrace:vfs_fstatat | 1 | |
| backtrace:SyS_fstatat64 | 1 | |
| Kernel_panic-not_syncing:Fatal_exception | 1 | |
| BUG:kernel_boot_crashed | 0 | 2 |
+-------------------------------------------------------+------------+------------+
Thanks,
Fengguang
next prev parent reply other threads:[~2014-10-07 4:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-04 13:46 [perf] BUG: unable to handle kernel NULL pointer dereference at 00000085 Fengguang Wu
2014-10-04 17:24 ` Peter Zijlstra
2014-10-07 4:56 ` Fengguang Wu [this message]
2014-10-07 5:03 ` Fengguang Wu
2014-10-07 8:17 ` Peter Zijlstra
2014-10-07 8:40 ` Fengguang Wu
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=20141007045633.GA17972@wfg-t540p.sh.intel.com \
--to=fengguang.wu@intel.com \
--cc=jet.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=peterz@infradead.org \
--cc=tao.su@intel.com \
--cc=yuanhan.liu@intel.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