Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-18 Thread Sandeepa Prabhu
On 18 November 2013 12:25, Sandeepa Prabhu wrote: >>> This is generic test module (samples/hw_breakpoint/data_breakpoint.ko) >>> which places watchpoint for bothe read/write. >>> Atleast watchpt should have triggered for Read right? I also tried >>> with othe functions like do_fork, vfs_read etc

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-18 Thread Sandeepa Prabhu
On 18 November 2013 12:25, Sandeepa Prabhu sandeepa.pra...@linaro.org wrote: This is generic test module (samples/hw_breakpoint/data_breakpoint.ko) which places watchpoint for bothe read/write. Atleast watchpt should have triggered for Read right? I also tried with othe functions like do_fork,

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-17 Thread Sandeepa Prabhu
>> This is generic test module (samples/hw_breakpoint/data_breakpoint.ko) >> which places watchpoint for bothe read/write. >> Atleast watchpt should have triggered for Read right? I also tried >> with othe functions like do_fork, vfs_read etc but no hit. > > You'd need to place something for exec

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-17 Thread Sandeepa Prabhu
This is generic test module (samples/hw_breakpoint/data_breakpoint.ko) which places watchpoint for bothe read/write. Atleast watchpt should have triggered for Read right? I also tried with othe functions like do_fork, vfs_read etc but no hit. You'd need to place something for exec if you

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-15 Thread Will Deacon
On Wed, Nov 13, 2013 at 03:55:42PM +, Sandeepa Prabhu wrote: > On 13 November 2013 20:01, Will Deacon wrote: > > On Wed, Nov 13, 2013 at 06:55:33AM +, Sandeepa Prabhu wrote: > >> 1. Placing watchpoint ( attr.bp_type = HW_BREAKPOINT_W | > >> HW_BREAKPOINT_R) upon vfs_symlink symbol, but

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-15 Thread Will Deacon
On Wed, Nov 13, 2013 at 03:55:42PM +, Sandeepa Prabhu wrote: On 13 November 2013 20:01, Will Deacon will.dea...@arm.com wrote: On Wed, Nov 13, 2013 at 06:55:33AM +, Sandeepa Prabhu wrote: 1. Placing watchpoint ( attr.bp_type = HW_BREAKPOINT_W | HW_BREAKPOINT_R) upon vfs_symlink

Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-13 Thread Masami Hiramatsu
(2013/11/13 1:59), Steven Rostedt wrote: > On Tue, 12 Nov 2013 16:25:26 +0530 > Sandeepa Prabhu wrote: > > >>> >>> BTW, I'm currently trying a general housecleaning of __kprobes >>> annotations. It may also have impact on your patch. >>> https://lkml.org/lkml/2013/11/8/187 >> Hmm, we can help

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-13 Thread Sandeepa Prabhu
On 13 November 2013 20:01, Will Deacon wrote: > On Wed, Nov 13, 2013 at 06:55:33AM +, Sandeepa Prabhu wrote: >> >>> I'm unsure about arm64's debug feature behavior, what does happen when >> >>> it performs a single-step on sw-breakpoint? >> >>> >> Sandeepa: I think you need to retry

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-13 Thread Will Deacon
On Wed, Nov 13, 2013 at 06:55:33AM +, Sandeepa Prabhu wrote: > >>> I'm unsure about arm64's debug feature behavior, what does happen when > >>> it performs a single-step on sw-breakpoint? > >>> > Sandeepa: I think you need to retry Masami's test on the arm64 model, > since >

Re: Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-13 Thread Masami Hiramatsu
(2013/11/13 15:55), Sandeepa Prabhu wrote: I'm unsure about arm64's debug feature behavior, what does happen when it performs a single-step on sw-breakpoint? > Sandeepa: I think you need to retry Masami's test on the arm64 model, > since > I'm fairly sure it won't work

Re: Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-13 Thread Masami Hiramatsu
(2013/11/13 15:55), Sandeepa Prabhu wrote: I'm unsure about arm64's debug feature behavior, what does happen when it performs a single-step on sw-breakpoint? Sandeepa: I think you need to retry Masami's test on the arm64 model, since I'm fairly sure it won't work as expected without some

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-13 Thread Will Deacon
On Wed, Nov 13, 2013 at 06:55:33AM +, Sandeepa Prabhu wrote: I'm unsure about arm64's debug feature behavior, what does happen when it performs a single-step on sw-breakpoint? Sandeepa: I think you need to retry Masami's test on the arm64 model, since I'm fairly sure it won't work

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-13 Thread Sandeepa Prabhu
On 13 November 2013 20:01, Will Deacon will.dea...@arm.com wrote: On Wed, Nov 13, 2013 at 06:55:33AM +, Sandeepa Prabhu wrote: I'm unsure about arm64's debug feature behavior, what does happen when it performs a single-step on sw-breakpoint? Sandeepa: I think you need to retry

Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-13 Thread Masami Hiramatsu
(2013/11/13 1:59), Steven Rostedt wrote: On Tue, 12 Nov 2013 16:25:26 +0530 Sandeepa Prabhu sandeepa.pra...@linaro.org wrote: BTW, I'm currently trying a general housecleaning of __kprobes annotations. It may also have impact on your patch. https://lkml.org/lkml/2013/11/8/187 Hmm, we

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-12 Thread Sandeepa Prabhu
On 13 November 2013 12:25, Sandeepa Prabhu wrote: I'm unsure about arm64's debug feature behavior, what does happen when it performs a single-step on sw-breakpoint? > Sandeepa: I think you need to retry Masami's test on the arm64 model, > since > I'm fairly sure it

Re: Re: Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-12 Thread Masami Hiramatsu
(2013/11/12 19:55), Sandeepa Prabhu wrote: > Thanks for steps, ARM64 ftrace patches are under review on arm mailing > list, I can contact the (linaro) developer implementing ftrace on > what's supported and then figure-out a way to test this concurrency of > kprobes breakpoint and

Re: Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-12 Thread Sandeepa Prabhu
On 12 November 2013 15:47, Masami Hiramatsu wrote: > (2013/11/12 17:44), Sandeepa Prabhu wrote: >> On 12 November 2013 12:57, Masami Hiramatsu >> wrote: >>> (2013/11/12 15:23), Sandeepa Prabhu wrote: >>> OK, I've ensured that the hw_breakpoint (from perf) can work >>> with kprobes (from

Re: Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-12 Thread Masami Hiramatsu
(2013/11/12 17:44), Sandeepa Prabhu wrote: > On 12 November 2013 12:57, Masami Hiramatsu > wrote: >> (2013/11/12 15:23), Sandeepa Prabhu wrote: >> OK, I've ensured that the hw_breakpoint (from perf) can work >> with kprobes (from ftrace) at the same address on x86. >> So if arm64

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-12 Thread Sandeepa Prabhu
On 12 November 2013 12:57, Masami Hiramatsu wrote: > (2013/11/12 15:23), Sandeepa Prabhu wrote: > OK, I've ensured that the hw_breakpoint (from perf) can work > with kprobes (from ftrace) at the same address on x86. > So if arm64 already support hw_breakpoint on perf, kprobes should

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-12 Thread Sandeepa Prabhu
On 12 November 2013 12:57, Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: (2013/11/12 15:23), Sandeepa Prabhu wrote: OK, I've ensured that the hw_breakpoint (from perf) can work with kprobes (from ftrace) at the same address on x86. So if arm64 already support hw_breakpoint on perf,

Re: Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-12 Thread Masami Hiramatsu
(2013/11/12 17:44), Sandeepa Prabhu wrote: On 12 November 2013 12:57, Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: (2013/11/12 15:23), Sandeepa Prabhu wrote: OK, I've ensured that the hw_breakpoint (from perf) can work with kprobes (from ftrace) at the same address on x86. So if

Re: Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-12 Thread Sandeepa Prabhu
On 12 November 2013 15:47, Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: (2013/11/12 17:44), Sandeepa Prabhu wrote: On 12 November 2013 12:57, Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: (2013/11/12 15:23), Sandeepa Prabhu wrote: OK, I've ensured that the hw_breakpoint

Re: Re: Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-12 Thread Masami Hiramatsu
(2013/11/12 19:55), Sandeepa Prabhu wrote: Thanks for steps, ARM64 ftrace patches are under review on arm mailing list, I can contact the (linaro) developer implementing ftrace on what's supported and then figure-out a way to test this concurrency of kprobes breakpoint and hardware breakpoint.

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-12 Thread Sandeepa Prabhu
On 13 November 2013 12:25, Sandeepa Prabhu sandeepa.pra...@linaro.org wrote: I'm unsure about arm64's debug feature behavior, what does happen when it performs a single-step on sw-breakpoint? Sandeepa: I think you need to retry Masami's test on the arm64 model, since I'm fairly sure it

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-11 Thread Masami Hiramatsu
(2013/11/12 15:23), Sandeepa Prabhu wrote: OK, I've ensured that the hw_breakpoint (from perf) can work with kprobes (from ftrace) at the same address on x86. So if arm64 already support hw_breakpoint on perf, kprobes should work with it. >>> >>> Single-stepping on x86 is

Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-11 Thread Sandeepa Prabhu
>>> OK, I've ensured that the hw_breakpoint (from perf) can work >>> with kprobes (from ftrace) at the same address on x86. >>> So if arm64 already support hw_breakpoint on perf, kprobes should >>> work with it. >> >> Single-stepping on x86 is different to the step behaviour on arm64 afaik. On >>

Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-11 Thread Masami Hiramatsu
(2013/11/11 19:58), Will Deacon wrote: > On Mon, Nov 11, 2013 at 10:51:52AM +, Masami Hiramatsu wrote: >> (2013/11/11 16:54), Masami Hiramatsu wrote: >> In fact, how do you avoid a race with hardware breakpoints? E.g., >> somebody >> places a hardware breakpoint on an instruction

Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-11 Thread Masami Hiramatsu
(2013/11/11 19:58), Will Deacon wrote: On Mon, Nov 11, 2013 at 10:51:52AM +, Masami Hiramatsu wrote: (2013/11/11 16:54), Masami Hiramatsu wrote: In fact, how do you avoid a race with hardware breakpoints? E.g., somebody places a hardware breakpoint on an instruction in the kernel for

Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-11 Thread Sandeepa Prabhu
OK, I've ensured that the hw_breakpoint (from perf) can work with kprobes (from ftrace) at the same address on x86. So if arm64 already support hw_breakpoint on perf, kprobes should work with it. Single-stepping on x86 is different to the step behaviour on arm64 afaik. On ARM, we have to

Re: Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-11 Thread Masami Hiramatsu
(2013/11/12 15:23), Sandeepa Prabhu wrote: OK, I've ensured that the hw_breakpoint (from perf) can work with kprobes (from ftrace) at the same address on x86. So if arm64 already support hw_breakpoint on perf, kprobes should work with it. Single-stepping on x86 is different to the step

Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-10 Thread Sandeepa Prabhu
On 9 November 2013 14:40, Masami Hiramatsu wrote: > (2013/11/09 1:56), Will Deacon wrote: >> Hi Sandeepa, >> >> On Thu, Oct 17, 2013 at 12:17:47PM +0100, Sandeepa Prabhu wrote: >>> Add support for basic kernel probes(kprobes), jump probes (jprobes) >>> for ARM64. >> >> I think this series will

Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-10 Thread Sandeepa Prabhu
On 9 November 2013 14:40, Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: (2013/11/09 1:56), Will Deacon wrote: Hi Sandeepa, On Thu, Oct 17, 2013 at 12:17:47PM +0100, Sandeepa Prabhu wrote: Add support for basic kernel probes(kprobes), jump probes (jprobes) for ARM64. I think this

Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-09 Thread Masami Hiramatsu
(2013/11/09 1:56), Will Deacon wrote: > Hi Sandeepa, > > On Thu, Oct 17, 2013 at 12:17:47PM +0100, Sandeepa Prabhu wrote: >> Add support for basic kernel probes(kprobes), jump probes (jprobes) >> for ARM64. > > I think this series will conflict quite heavily with the jump_label series, > since

Re: Re: [PATCH RFC 2/6] arm64: Kprobes with single stepping support

2013-11-09 Thread Masami Hiramatsu
(2013/11/09 1:56), Will Deacon wrote: Hi Sandeepa, On Thu, Oct 17, 2013 at 12:17:47PM +0100, Sandeepa Prabhu wrote: Add support for basic kernel probes(kprobes), jump probes (jprobes) for ARM64. I think this series will conflict quite heavily with the jump_label series, since they both