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: <1358284049.4068.21.camel@gandalf.local.home>
Date:	Tue, 15 Jan 2013 16:07:29 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	David Daney <ddaney.cavm@...il.com>
Cc:	Al Cooper <alcooperx@...il.com>, ralf@...ux-mips.org,
	linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mips: function tracer: Fix broken function tracing

On Tue, 2013-01-15 at 09:55 -0800, David Daney wrote:

> > There's nothing that states what the ftrace caller must be. We can have
> > it do a proper stack update. That is, only at boot up do we need to
> > handle the defined mcount. After that, those instructions are just place
> > holders for our own algorithms. If the addiu was needed for the defined
> > mcount, there's no reason to keep it for our own ftrace_caller.
> >
> > Would that work?
> 
> ... either do as you suggest and dynamically change the ABI of the 
> target function.

We already change the ABI. We have it call ftrace_caller instead of
mcount.

BTW, I've just compiled with gcc 4.6.3 against mips, and I don't see the
issue. I have:

0000000000000000 <account_kernel_stack>:
       0:       03e0082d        move    at,ra
       4:       0c000000        jal     0 <account_kernel_stack>
                        4: R_MIPS_26    _mcount
                        4: R_MIPS_NONE  *ABS*
                        4: R_MIPS_NONE  *ABS*
       8:       0000602d        move    t0,zero
       c:       2402000d        li      v0,13
      10:       3c030000        lui     v1,0x0
                        10: R_MIPS_HI16 mem_section
                        10: R_MIPS_NONE *ABS*
                        10: R_MIPS_NONE *ABS*
      14:       000216fc        dsll32  v0,v0,0x1b
      18:       64630000        daddiu  v1,v1,0

Is it dependent on the config?

> 
> Or add support to GCC for a better tracing ABI (as I already said we did 
> for mips64).

I wouldn't waste time changing gcc for this. If you're going to change
gcc than please implement the -mfentry option. Look at x86_64 to
understand this more.

-- Steve


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