Re: [PATCH v12 7/7] ARM: kprobes: enable OPTPROBES for ARM 32

2014-12-07 Thread Wang Nan
On 2014/12/5 22:59, Jon Medhurst (Tixy) wrote: > On Fri, 2014-12-05 at 10:10 +, Jon Medhurst (Tixy) wrote: > [...] >> I'm worried because this whole optimised kprobes has some rather >> complicated interactions, e.g. can the background thread that changes >> breakpoints to jumps (or back again?

Re: [PATCH v12 7/7] ARM: kprobes: enable OPTPROBES for ARM 32

2014-12-05 Thread Peter Maydell
On 5 December 2014 at 10:10, Jon Medhurst (Tixy) wrote: > I don't know much about QEMU and have never used it, but I'm assuming > QEMU doesn't make any attempt to simulate caches like the data cache, > instruction cache, TLBs, branch predictor? Does it even emulate multiple > CPUs with multiple ho

Re: [PATCH v12 7/7] ARM: kprobes: enable OPTPROBES for ARM 32

2014-12-05 Thread Jon Medhurst (Tixy)
On Fri, 2014-12-05 at 10:10 +, Jon Medhurst (Tixy) wrote: [...] > I'm worried because this whole optimised kprobes has some rather > complicated interactions, e.g. can the background thread that changes > breakpoints to jumps (or back again?) could occur at the same time > another CPU is proces

Re: [PATCH v12 7/7] ARM: kprobes: enable OPTPROBES for ARM 32

2014-12-05 Thread Jon Medhurst (Tixy)
On Fri, 2014-12-05 at 18:32 +0800, Wang Nan wrote: > Both your and mine failure are related to ldrd/h instruction. What > about your second failed testcase? Can't remember exactly, but it was some instruction that didn't access memory I remember that much. I've also just run the tests on an A9 CP

Re: [PATCH v12 7/7] ARM: kprobes: enable OPTPROBES for ARM 32

2014-12-05 Thread Wang Nan
On 2014/12/5 18:10, Jon Medhurst (Tixy) wrote: > On Fri, 2014-12-05 at 11:38 +0800, Wang Nan wrote: >> On 2014/12/5 0:21, Jon Medhurst (Tixy) wrote: >>> On Thu, 2014-12-04 at 13:36 +0800, Wang Nan wrote: >>> >> >> [trim some text] >> >>> >>> I have retested this patch and on one of the arm test cas

Re: [PATCH v12 7/7] ARM: kprobes: enable OPTPROBES for ARM 32

2014-12-05 Thread Jon Medhurst (Tixy)
On Fri, 2014-12-05 at 11:38 +0800, Wang Nan wrote: > On 2014/12/5 0:21, Jon Medhurst (Tixy) wrote: > > On Thu, 2014-12-04 at 13:36 +0800, Wang Nan wrote: > > > > [trim some text] > > > > > I have retested this patch and on one of the arm test cases I get an > > undefined instruction exception i

Re: [PATCH v12 7/7] ARM: kprobes: enable OPTPROBES for ARM 32

2014-12-04 Thread Wang Nan
On 2014/12/5 0:21, Jon Medhurst (Tixy) wrote: > On Thu, 2014-12-04 at 13:36 +0800, Wang Nan wrote: > [trim some text] > > I have retested this patch and on one of the arm test cases I get an > undefined instruction exception in kprobe_arm_test_cases. When this > happens PC points to the second

Re: [PATCH v12 7/7] ARM: kprobes: enable OPTPROBES for ARM 32

2014-12-04 Thread Russell King - ARM Linux
On Thu, Dec 04, 2014 at 01:36:00PM +0800, Wang Nan wrote: > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index 89c4b5c..8281cea 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -59,6 +59,7 @@ config ARM > select HAVE_MEMBLOCK > select HAVE_MOD_ARCH_SPECIFIC if ARM_UNW

Re: [PATCH v12 7/7] ARM: kprobes: enable OPTPROBES for ARM 32

2014-12-04 Thread Jon Medhurst (Tixy)
On Thu, 2014-12-04 at 13:36 +0800, Wang Nan wrote: > This patch introduce kprobeopt for ARM 32. > > Limitations: > - Currently only kernel compiled with ARM ISA is supported. > > - Offset between probe point and optinsn slot must not larger than >32MiB. Masami Hiramatsu suggests replacing 2

[PATCH v12 7/7] ARM: kprobes: enable OPTPROBES for ARM 32

2014-12-03 Thread Wang Nan
This patch introduce kprobeopt for ARM 32. Limitations: - Currently only kernel compiled with ARM ISA is supported. - Offset between probe point and optinsn slot must not larger than 32MiB. Masami Hiramatsu suggests replacing 2 words, it will make things complex. Futher patch can make suc