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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1338298017.13348.293.camel@gandalf.stny.rr.com>
Date:	Tue, 29 May 2012 09:26:57 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Dave Jones <davej@...hat.com>
Cc:	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>, Andi Kleen <ak@...ux.intel.com>
Subject: Re: BUG - function tracing with breakpoints

On Tue, 2012-05-29 at 07:37 -0400, Steven Rostedt wrote:

> trace_hardirqs_on_caller {
> 	__trace_hardirqs_on_caller(ip) {
> 		mark_locks_held() {
> 			mark_lock() {
> 				save_trace() {
> 					save_stack_trace()...
> 
> 
> Unfortunately, the save_stack_trace() is traced by the function tracer.
> Which means that it will hit a breakpoint and jump into the breakpoint
> code. But here it will reset the stack and corrupt the current stack,
> causing strange hard-to-debug bugs.
> 

Bah, unfortunately this still isn't enough, as save_stack_trace() calls
a lot more that happens to be traced. I'm looking into seeing if I can
change lockdep not to blindly do records when enabling interrupts.

-- Steve

> There's no reason to function trace stack dumps, and this stops the bug
> from triggering when I apply it.
> 
> Dave, can you give this a try too?
> 
> Thanks!
> 
> -- Steve
> 
> diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
> index 532d2e0..0026999 100644
> --- a/arch/x86/kernel/Makefile
> +++ b/arch/x86/kernel/Makefile
> @@ -14,6 +14,10 @@ CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
>  CFLAGS_REMOVE_pvclock.o = -pg
>  CFLAGS_REMOVE_kvmclock.o = -pg
>  CFLAGS_REMOVE_ftrace.o = -pg
> +CFLAGS_REMOVE_dumpstack.o = -pg
> +CFLAGS_REMOVE_dumpstack_32.o = -pg
> +CFLAGS_REMOVE_dumpstack_64.o = -pg
> +CFLAGS_REMOVE_stacktrace.o = -pg
>  CFLAGS_REMOVE_early_printk.o = -pg
>  endif
>  
> 


--
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