All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arun Sharma <asharma@fb.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>,
	<linux-kernel@vger.kernel.org>, <mingo@elte.hu>
Subject: Re: [PATCH] perf/x86: fix broken LBR fixup code
Date: Mon, 11 Jun 2012 12:41:03 -0700	[thread overview]
Message-ID: <4FD649CF.5020300@fb.com> (raw)
In-Reply-To: <1339422464.30462.17.camel@twins>

On 6/11/12 6:47 AM, Peter Zijlstra wrote:
> On Mon, 2012-06-11 at 15:44 +0200, Stephane Eranian wrote:
>> I noticed that the LBR fixups were not working anymore
>> on programs where they used to. I tracked this down to
>> a recent change to copy_from_user_nmi().
>>
>> commit db0dc75d6403b6663c0eab4c6ccb672eb9b2ed72
>> Author: Arun Sharma<asharma@fb.com>
>> Date:   Fri Apr 20 15:41:36 2012 -0700
>>
>>      perf/x86: Check user address explicitly in copy_from_user_nmi()
>>
>> This commit added a call to __range_not_ok() to the
>> copy_from_user_nmi() routine. The problem is that the logic
>> of the test must be reversed. __range_not_ok() returns 0 if the
>> range is VALID. We want to return early from copy_from_user_nmi()
>> if the range is NOT valid.
>
> D'0h.. Thanks!

My bad. I was fooled by all the kernel addresses that were unwound 
properly. Didn't notice the broken unwinding in user space before I sent 
the patch. The fix looks good. Thanks.

  -Arun

  reply	other threads:[~2012-06-11 19:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11 13:44 [PATCH] perf/x86: fix broken LBR fixup code Stephane Eranian
2012-06-11 13:47 ` Peter Zijlstra
2012-06-11 19:41   ` Arun Sharma [this message]
2012-06-14  8:40 ` [tip:perf/urgent] perf/x86: Fix " tip-bot for Stephane Eranian

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=4FD649CF.5020300@fb.com \
    --to=asharma@fb.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.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 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.