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: <20100603205948.GA3080@redhat.com>
Date:	Thu, 3 Jun 2010 22:59:48 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Arjan van de Ven <arjan@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>,
	Roland McGrath <roland@...hat.com>,
	Vegard Nossum <vegard.nossum@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] x86: make save_stack_address()
	!CONFIG_FRAME_POINTER friendly

On 06/03, Frederic Weisbecker wrote:
>
> On Thu, Jun 03, 2010 at 10:31:55PM +0200, Oleg Nesterov wrote:
> >
> > Do you mean it makes sense to add the helper which depends on
> > FRAME_POINTER ?
>
> Having in asm/stacktrace.h:
>
> #ifdef CONFIG_FRAME_POINTER
> static inline int reliable_frame_pointer(int reliable)
> {
> 	return reliable;
> }
> #else
> static inline int reliable_frame_pointer(int reliable)
> {
> 	return 1;
> }
> #endif
>
> But if we have only one user I'm not sure it's worth it.

Me too ;) let's ignore this.

> > Frederic, Arjan. Honestly, I have no opinion if this change makes
> > things better or worse for, say, lockdep.
> >
> > But note that this only affects the !CONFIG_FRAME_POINTER case.
> > Looking into Kconfig's I don't even understand how the bug reporters
> > managed to set CONFIG_STACKTRACE without !CONFIG_FRAME_POINTER.
> >
> > So, should I redo this patch to fix /proc/pid/stack ? Say, we
> > can change the meaning of stack_trace-<skip, if it is < 0, then
> > save_stack_address() ignores reliable. Yes, this is hack.
>
>
> No, people may want to ignore reliable and also to skip
> entries.

Yes, but currently stack_trace->skip is always >= 0. So I think
this should work

	skip  > 0 	- skip that much entries, consider reliable
	skip == 0	- don't skip, consider reliable
	skip  < 0	- skip nothing

But yes, I do not like this idea too much. I was going to use this
hack if this patch is nacked.

> I think your patches as is are the right way to go: by default provide
> as much information as we can.
>
> And those who care about reliability can use their own stack ops, which
> is what perf does for example. If needed we can still add a new
> save_stack_trace_reliable() in the future.

Great. Thanks!

Oleg.

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