ppc32/kprobe: Fix a bug for kprobe stwu r1

Tiejun Chen tiejun.chen at windriver.com
Mon Dec 12 19:50:49 EST 2011


ppc32/kprobe: Fix a bug for kprobe stwu r1

There patches is used to fix that known kprobe bug,
[BUG?]3.0-rc4+ftrace+kprobe: set kprobe at instruction 'stwu' lead to system crash/freeze

https://lkml.org/lkml/2011/7/3/156

We withdraw the original way to provide a dedicated exception stack. Now we
implement this based on Ben's suggestion:

https://lkml.org/lkml/2011/11/30/327

Here I fix this bug only for ppc32 since Ben address another problem in ppc64
exception return codes. So I think I'd better send another patch to fix this
bug issued from ppc64 firstly. Then its convenient to merge this fix into ppc64.

Tiejun Chen (4):
      powerpc/kprobe: introduce a new thread flag
      ppc32/kprobe: introduce copy_exc_stack
      ppc32/kprobe: complete kprobe and migrate exception frame
      ppc32/kprobe: don't emulate store when kprobe stwu r1

 arch/powerpc/include/asm/page_32.h     |    1 +
 arch/powerpc/include/asm/thread_info.h |    2 ++
 arch/powerpc/kernel/entry_32.S         |   26 ++++++++++++++++++++++++++
 arch/powerpc/kernel/misc_32.S          |   16 +++++++++++++++-
 arch/powerpc/kernel/ppc_ksyms.c        |    1 +
 arch/powerpc/lib/sstep.c               |   19 +++++++++++++++++--
 6 files changed, 62 insertions(+), 3 deletions(-)

Tiejun




More information about the Linuxppc-dev mailing list