lkml.org 
[lkml]   [2013]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG] perf: arch_perf_out_copy_user default
Hi Peter,

On Wed, Oct 30, 2013 at 08:16:22PM +0000, Peter Zijlstra wrote:
> On Wed, Oct 30, 2013 at 08:50:28PM +0100, Frederic Weisbecker wrote:
> >
> > Would it make sense to rather make copy_from_user_nmi() to use a return value
> > pattern that is closer to those of the existing copy_from_user_*() ?
>
> Yeah we can do that I suppose; copy_form_user_nmi() actually uses
> __copy_from_user_inatomic() since about a week.
>
> Something like so I suppose.. please check, I'm in fail mode.
>
> It looks like DEFINE_OUTPUT_COPY() functions already returned the bytes
> not copied, and all its users appear to indeed expect that.
>
> ---
> arch/x86/kernel/cpu/perf_event.c | 4 ++--
> arch/x86/kernel/cpu/perf_event_intel_ds.c | 2 +-
> arch/x86/kernel/cpu/perf_event_intel_lbr.c | 2 +-
> arch/x86/lib/usercopy.c | 2 +-
> arch/x86/oprofile/backtrace.c | 4 ++--
> kernel/events/internal.h | 35 ++++++++++++++++++++++--------
> 6 files changed, 33 insertions(+), 16 deletions(-)

The core changes look good to me, and I've tested that this still produces
callchain information for ARM. It's odd that this worked so well before...

Acked-by: Will Deacon <will.deacon@arm.com>

Will


\
 
 \ /
  Last update: 2013-10-30 23:41    [W:0.041 / U:1.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site