mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: shuah.khan@hp.com
Cc: eranian@google.com, Greg KH <gregkh@linuxfoundation.org>,
	a.p.zijlstra@chello.nl, paulus@samba.org, mingo@elte.hu,
	acme@ghostprotocols.net, tglx@linutronix.de, hpa@zytor.com,
	pavel@ucw.cz, rafael.j.wysocki@intel.com,
	LKML <linux-kernel@vger.kernel.org>,
	torvalds@linux-foundation.org, peterz@infradead.org,
	Andrew Morton <akpm@linux-foundation.org>,
	jolsa@redhat.com, ak@linux.intel.com,
	stable <stable@vger.kernel.org>,
	shuahkhan@gmail.com
Subject: Re: [PATCH 3.0] perf,x86: fix kernel crash with PEBS/BTS after suspend/resume
Date: Thu, 21 Mar 2013 02:41:46 +0000	[thread overview]
Message-ID: <1363833706.31336.99.camel@deadeye.wl.decadent.org.uk> (raw)
In-Reply-To: <1363395478.7231.9.camel@lorien2>

[-- Attachment #1: Type: text/plain, Size: 1569 bytes --]

On Fri, 2013-03-15 at 18:57 -0600, Shuah Khan wrote:
> This patch fixes a kernel crash when using precise sampling (PEBS)
> after a suspend/resume. Turns out the CPU notifier code is not invoked
> on CPU0 (BP). Therefore, the DS_AREA (used by PEBS) is not restored properly
> by the kernel and keeps it power-on/resume value of 0 causing any PEBS
> measurement to crash when running on CPU0.
> 
> The workaround is to add a hook in the actual resume code to restore
> the DS Area MSR value. It is invoked for all CPUS. So for all but CPU0,
> the DS_AREA will be restored twice but this is harmless.
> 
> Upstream commit id: 1d9d8639c063caf6efc2447f5f26aa637f844ff6
> 
> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Stephane Eranian <eranian@google.com>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Shuah Khan <shuah.khan@hp.com>
> CC: stable@vger.kernel.org 3.0
[...]

I've queued this up for 3.2 (though context was different again), along
with the following fix-ups:

commit 2a6e06b2aed6995af401dcd4feb5e79a0c7ea554
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Mar 17 15:44:43 2013 -0700

    perf,x86: fix wrmsr_on_cpu() warning on suspend/resume

commit 6c4d3bc99b3341067775efd4d9d13cc8e655fd7c
Author: David Rientjes <rientjes@google.com>
Date:   Sun Mar 17 15:49:10 2013 -0700

    perf,x86: fix link failure for non-Intel configs

Ben.

-- 
Ben Hutchings
It is easier to write an incorrect program than to understand a correct one.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

      reply	other threads:[~2013-03-21  2:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-16  0:57 Shuah Khan
2013-03-21  2:41 ` Ben Hutchings [this message]

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=1363833706.31336.99.camel@deadeye.wl.decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=eranian@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=shuah.khan@hp.com \
    --cc=shuahkhan@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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

all inboxes | Powered by JetHome®