Re: [PATCH] MIPS: Ftrace: Fix dynamic tracing of kernel modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 06, 2014 at 01:12:06PM -0400, Alan Cooper wrote:

> Actually , there's no reason to write the second NOP when nop'ing the
> mcount call site in a module. This was done to remove the stack adjust
> instruction which only exists at this location for internal kernel
> routines. The following diff seems like a simpler way to solve issue
> #1:

Oh?

$ mips-linux-objdump -d --reloc net/sctp/sctp.ko
[...]
00000000 <sctp_sm_lookup_event>:
       0:       27bdffe8        addiu   sp,sp,-24
       4:       afbf0014        sw      ra,20(sp)
       8:       3c030000        lui     v1,0x0
                        8: R_MIPS_HI16  _mcount
       c:       24630000        addiu   v1,v1,0
                        c: R_MIPS_LO16  _mcount
      10:       03e00821        move    at,ra
      14:       27ac0014        addiu   t4,sp,20
      18:       0060f809        jalr    v1
      1c:       27bdfff8        addiu   sp,sp,-8  <====
[...]
      64:       27bd0018        addiu   sp,sp,24
      68:       03e00008        jr      ra
[...]

So the stack adjustment also exists for modules.

Or am I missunderstanding something?

  Ralf


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux