Re: ftrace introduces instability into kernel 2.6.27(-rc2,-rc3)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mathieu Desnoyers
Date: Tuesday, August 19, 2008 - 7:42 am

* Eran Liberty (liberty@extricom.com) wrote:

Ah !

I think I see what could be wrong :

First we have :

static unsigned int ftrace_nop = 0x60000000;

We probably replace the original function call by this nop.

Then we do :

notrace unsigned char *ftrace_call_replace(unsigned long ip, unsigned long addr)
{
        static unsigned int op;

        /*
         * It would be nice to just use create_function_call, but that will
         * update the code itself. Here we need to just return the
         * instruction that is going to be modified, without modifying the
         * code.
         */
        addr = GET_ADDR(addr);

        /* Set to "bl addr" */
        op = 0x48000001 | (ftrace_calc_offset(ip, addr) & 0x03fffffc);

        /*
         * No locking needed, this must be called via kstop_machine
         * which in essence is like running on a uniprocessor machine.
         */
        return (unsigned char *)&op;
}

And I guess we must be doing a 0x48000001 | 0x0; or something ?

Also, we have to consider that POWERPC 64 functions are :

/* PowerPC64's functions are data that points to the functions */

And this does not seem to hold for ppc32. Therefore, it is strange to me
that the same code is used for the update.. are we updating the correct
site ?

Mathieu


-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Mathieu Desnoyers, (Mon Aug 18, 8:47 am)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Mathieu Desnoyers, (Mon Aug 18, 10:04 am)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Mathieu Desnoyers, (Mon Aug 18, 11:41 am)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Benjamin Herrenschmidt, (Mon Aug 18, 6:51 pm)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Benjamin Herrenschmidt, (Mon Aug 18, 6:53 pm)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Benjamin Herrenschmidt, (Mon Aug 18, 6:54 pm)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Benjamin Herrenschmidt, (Mon Aug 18, 7:39 pm)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Mathieu Desnoyers, (Mon Aug 18, 7:47 pm)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Benjamin Herrenschmidt, (Mon Aug 18, 7:56 pm)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Mathieu Desnoyers, (Mon Aug 18, 8:36 pm)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Benjamin Herrenschmidt, (Mon Aug 18, 9:17 pm)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Mathieu Desnoyers, (Tue Aug 19, 6:02 am)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Mathieu Desnoyers, (Tue Aug 19, 6:05 am)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Mathieu Desnoyers, (Tue Aug 19, 7:42 am)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Mathieu Desnoyers, (Tue Aug 19, 10:34 am)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Benjamin Herrenschmidt, (Tue Aug 19, 2:46 pm)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Benjamin Herrenschmidt, (Tue Aug 19, 2:47 pm)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Jeremy Fitzhardinge, (Tue Aug 19, 4:58 pm)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Benjamin Herrenschmidt, (Tue Aug 19, 6:17 pm)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Benjamin Herrenschmidt, (Wed Aug 20, 12:18 am)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Benjamin Herrenschmidt, (Wed Aug 20, 2:36 pm)
Re: ftrace introduces instability into kernel 2.6.27(-rc2, ..., Benjamin Herrenschmidt, (Wed Aug 20, 2:37 pm)