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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ADF3FE0.5090104@caviumnetworks.com>
Date:	Wed, 21 Oct 2009 10:07:44 -0700
From:	David Daney <ddaney@...iumnetworks.com>
To:	rostedt@...dmis.org
CC:	Wu Zhangjin <wuzhangjin@...il.com>, linux-kernel@...r.kernel.org,
	linux-mips@...ux-mips.org, Thomas Gleixner <tglx@...utronix.de>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Nicholas Mc Guire <der.herr@...r.at>
Subject: Re: [PATCH -v4 9/9] tracing: add function graph tracer support for
 MIPS

Steven Rostedt wrote:
> On Wed, 2009-10-21 at 09:37 -0700, David Daney wrote:
> 
>> There is no deterministic way to identify MIPS function prologs.  This 
>> is especially true for leaf functions, but also for functions with 
>> multiple return sites.
>>
>> For certain GCC versions there may be a set of command line options that 
>> would give good results, but in general it is not possible.  Attempts at 
>> fast backtrace generation using code inspection are not reliable and 
>> will invariably result in faults and panics when they fail.
> 
> Thanks for the update.
> 
> We can easily protect against panics, since we do fault protection
> within the code (although currently it will panic on fault, but we can
> fix that ;-). We can limit the search to a couple of 100 instructions,
> as well as fail on first panic.
> 
> But are you sure that when compiled with -pg, that GCC does not give a
> reliable prologue. Things are different when GCC is compiled with -pg,
> it may indeed always have something that we can flag.
> 
> We could also add other tests, like the subtraction of the stack too.
> 

I have not used -pg, so I don't know for sure, I think all it does is 
add the calls to _mcount.  Someone could investigate 
-fno-omit-frame-pointer, with that you may be able to use:

    move    s8,sp

To identify function prologs, but it would still be ad hoc, as modern 
versions of GCC will reorder instructions in the prolog for better 
scheduling.

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