lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 18 Nov 2010 16:32:44 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Soeren Sandmann <sandmann@...mi.au.dk>
Cc:	Søren Sandmann Pedersen <ssp@...hat.com>,
	mingo@...e.hu, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/1] x86: Eliminate bp argument from the stack tracing
	routines

On Mon, Nov 08, 2010 at 12:38:22PM +0100, Soeren Sandmann wrote:
> Frederic Weisbecker <fweisbec@...il.com> writes:
> 
> > > (FWIW, this
> > > 
> > > diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
> > > index 461a85d..d977d26 100644
> > > --- a/arch/x86/kernel/cpu/perf_event.c
> > > +++ b/arch/x86/kernel/cpu/perf_event.c
> > > @@ -1653,7 +1653,7 @@ static const struct stacktrace_ops backtrace_ops = {
> > >  	.warning_symbol		= backtrace_warning_symbol,
> > >  	.stack			= backtrace_stack,
> > >  	.address		= backtrace_address,
> > > -	.walk_stack		= print_context_stack_bp,
> > > +	.walk_stack		= print_context_stack,
> > >  };
> > > 
> > > makes it produce correct kernel callchains. And yes, I did compile the
> > > kernel with CONFIG_FRAME_POINTER).
> > 
> > 
> > 
> > What do you see is broken in 64 bits perf callchains? Can you please provide
> > me more details so that I can fix the issue?
> 
> Apparently, the problem only happens when using the hrtimer based
> events. I don't think there is a way to make perf use those from the
> command line, but if you apply this:


You can, with perf record -e cpu-clock :)


> 
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -294,6 +294,12 @@ static void create_counter(int counter, int cpu)
>                 attr->enable_on_exec = 1;
>         }
>  
> +       if (attr->config == PERF_COUNT_HW_CPU_CYCLES && attr->type ==
> PERF_TYPE_HARDWARE)
> +       {
> +           attr->type = PERF_TYPE_SOFTWARE;
> +           attr->config = PERF_COUNT_SW_CPU_CLOCK;
> +       }
> +       
>         for (thread_index = 0; thread_index < thread_num; thread_index++) {
>  try_again:
>                 fd[nr_cpu][counter][thread_index] = sys_perf_event_open(attr,
> 
> you should be able to see the problem.  You can also try sysprof; it
> always uses the software counters.


Yep I can reproduce, there is indeed something weird happening there. I'll fix,
thanks for your report!!

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ