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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1300885734.1479.6.camel@leonhard>
Date:	Wed, 23 Mar 2011 22:08:54 +0900
From:	Namhyung Kim <namhyung@...il.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	mingo@...hat.com, hpa@...or.com, linux-kernel@...r.kernel.org,
	tglx@...utronix.de
Subject: Re: [tip:x86/cleanups] x86, dumpstack: Use frame pointer during
 stack trace

2011-03-11 (금), 00:02 +0100, Frederic Weisbecker:
> On Thu, Mar 10, 2011 at 10:26:07PM +0000, tip-bot for Namhyung Kim wrote:
> > Commit-ID:  2f8058ae197236f9d5641850ce27f67d8f3e0b39
> > Gitweb:     http://git.kernel.org/tip/2f8058ae197236f9d5641850ce27f67d8f3e0b39
> > Author:     Namhyung Kim <namhyung@...il.com>
> > AuthorDate: Tue, 8 Mar 2011 20:44:22 +0900
> > Committer:  Thomas Gleixner <tglx@...utronix.de>
> > CommitDate: Thu, 10 Mar 2011 23:20:30 +0100
> > 
> > x86, dumpstack: Use frame pointer during stack trace
> > 
> > If CONFIG_FRAME_POINTER is set then use the frame pointer for the
> > stack backtrace rather than scanning whole stack blindly.
> 
> We don't do it blindly, we actually check the reliability with the
> frame pointer.
> 
> I'm not sure this patch is a good idea. stack dumps need to stay very
> robust and not exclusively rely on the frame pointer to be correct.
> At least walking blindly the stack provides a best effort dump as a last
> resort.
> 

Sounds reasonable. How about adding a boot param to control it then?


diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
index 809d027de28f..0d7efd90c588 100644
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -177,6 +177,16 @@ static const struct stacktrace_ops print_trace_ops
#endif
 };
 
+static int __init nofptrace_setup(char *s)
+{
+	struct stacktrace_ops *ops;
+
+	ops = (struct stacktrace_ops *) &print_trace_ops;
+	ops->walk_stack = walk_context_stack;
+	return 0;
+}
+early_param("nofptrace", nofptrace_setup);
+
 void
 show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
 		unsigned long *stack, unsigned long bp, char *log_lvl)



-- 
Regards,
Namhyung Kim


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