Re: [PATCH v2] arm64: fix unwind_frame() for filtered out fn for function graph tracing

2017-09-12 Thread Pratyush Anand
On Wednesday 13 September 2017 08:12 AM, Will Deacon wrote: On Tue, Sep 12, 2017 at 10:54:28AM +0100, James Morse wrote: Hi Pratyush, On 01/09/17 06:48, Pratyush Anand wrote: do_task_stat() calls get_wchan(), which further does unbind_frame(). unbind_frame() restores frame->pc to origi

[PATCH v2] arm64: fix unwind_frame() for filtered out fn for function graph tracing

2017-08-31 Thread Pratyush Anand
ead+0x88/0x144 [] SyS_read+0x60/0xc0 [] __sys_trace_return+0x0/0x4 fixes: 20380bb390a4 (arm64: ftrace: fix a stack tracer's output under function graph tracer) Signed-off-by: Pratyush Anand --- v1 -> v2: - improved commit log - now index is restored and thereafter frame->pc

Re: [PATCH 03/14] resource: add walk_system_ram_res_rev()

2017-08-30 Thread Pratyush Anand
On Thursday 24 August 2017 01:48 PM, AKASHI Takahiro wrote: This function, being a variant of walk_system_ram_res() introduced in commit 8c86e70acead ("resource: provide new functions to walk through resources"), walks through a list of all the resources of System RAM in reversed order, i.e., f

Re: [PATCH] arm64: fix unwind_frame() for filtered out fn via set_graph_notrace

2017-08-30 Thread Pratyush Anand
have fixed it. I hope, it won't miss from next time. On 28/08/17 13:53, Pratyush Anand wrote: Testcase: cd /sys/kernel/debug/tracing/ echo schedule > set_graph_notrace echo 1 > options/display-graph echo wakeup > current_tracer ps -ef | grep -i agent Above commands result in PANIC

[PATCH] arm64: fix unwind_frame() for filtered out fn via set_graph_notrace

2017-08-28 Thread Pratyush Anand
gt;pc for function graph tracer if the function has been marked in set_graph_notrace. This patch fixes: 20380bb390a4 (arm64: ftrace: fix a stack tracer's output under function graph tracer) Signed-off-by: Pratyush Anand --- arch/arm64/kernel/stacktrace.c | 3 ++- 1 file changed, 2 insertions(+),

Re: [PATCH v3 0/5] ARM64: disable irq between breakpoint and step exception

2017-08-24 Thread Pratyush Anand
Monday 31 July 2017 04:10 PM, Pratyush Anand wrote: v2 -> v3 - Moved step_needed from uapi structure to kernel only structure - Re-enable interrupt if stepped instruction faults - Modified register_wide_hw_breakpoint() to accept step_needed arg v2 was here: http://marc.info/?l=linux

[PATCH] tracer: hwlat: allow to be default bootup tracer

2017-08-11 Thread Pratyush Anand
. Signed-off-by: Pratyush Anand --- kernel/trace/trace_hwlat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c index d7c8e4ec3d9d..09f8f0950b6c 100644 --- a/kernel/trace/trace_hwlat.c +++ b/kernel/trace/trace_hwlat.c @@ -630,4

Re: RCU stall when using function_graph

2017-08-09 Thread Pratyush Anand
On Sunday 06 August 2017 10:32 PM, Paul E. McKenney wrote: On Sat, Aug 05, 2017 at 02:24:21PM +0900, κΉ€λ™ν˜„ wrote: Dear All As for me, after configuring function_graph as below, crash disappears. "echo 0 > d/tracing/tracing_on" "sleep 1" "echo function_graph > d/tracing/current_tracer" "sleep 1

Re: rcu_sched stall while waiting in csd_lock_wait()

2017-08-02 Thread Pratyush Anand
Hi Peter, On Wednesday 02 August 2017 01:44 PM, Peter Zijlstra wrote: On Wed, Aug 02, 2017 at 09:01:19AM +0530, Pratyush Anand wrote: Hi, I am observing following rcu_sched stall while executing `perf record -a -- sleep 1` with one of the arm64 platform. It looks like that stalled cpu was

Re: rcu_sched stall while waiting in csd_lock_wait()

2017-08-02 Thread Pratyush Anand
Hi Marc, On Wednesday 02 August 2017 02:14 PM, Marc Zyngier wrote: On 02/08/17 09:08, Will Deacon wrote: Hi Pratyush, On Wed, Aug 02, 2017 at 09:01:19AM +0530, Pratyush Anand wrote: I am observing following rcu_sched stall while executing `perf record -a -- sleep 1` with one of the arm64

Re: rcu_sched stall while waiting in csd_lock_wait()

2017-08-02 Thread Pratyush Anand
Hi Will, On Wednesday 02 August 2017 01:38 PM, Will Deacon wrote: Hi Pratyush, On Wed, Aug 02, 2017 at 09:01:19AM +0530, Pratyush Anand wrote: I am observing following rcu_sched stall while executing `perf record -a -- sleep 1` with one of the arm64 platform. It looks like that stalled cpu

Re: [PATCH v3 0/5] ARM64: disable irq between breakpoint and step exception

2017-08-02 Thread Pratyush Anand
Hi James, Thanks for your analysis. On Wednesday 02 August 2017 10:43 PM, James Morse wrote: Hi Pratyush, On 01/08/17 05:18, Pratyush Anand wrote: On Monday 31 July 2017 10:45 PM, James Morse wrote: On 31/07/17 11:40, Pratyush Anand wrote: samples/hw_breakpoint/data_breakpoint.c passes

Query: rcu_sched detected stalls with function_graph tracer

2017-08-01 Thread Pratyush Anand
Hi Steve, I am using a 3.10 based kernel, and when I enable function_graph with one particular x86_64 machine, I encounter rcu_sched stall. echo function_graph > /sys/kernel/debug/tracing/current_tracer echo 1 > /sys/kernel/debug/tracing/tracing_on If I use 4.13-rc2, then its better, but stil

rcu_sched stall while waiting in csd_lock_wait()

2017-08-01 Thread Pratyush Anand
Hi, I am observing following rcu_sched stall while executing `perf record -a -- sleep 1` with one of the arm64 platform. It looks like that stalled cpu was waiting in csd_lock_wait() from where it never came out,and so the stall. Any help/pointer for further debugging would be very helpful. P

Re: [PATCH v3 0/5] ARM64: disable irq between breakpoint and step exception

2017-08-01 Thread Pratyush Anand
Hi Takahiro, On Tuesday 01 August 2017 01:44 PM, AKASHI Takahiro wrote: Hi Pratyush, On Mon, Jul 31, 2017 at 04:10:28PM +0530, Pratyush Anand wrote: v2 -> v3 - Moved step_needed from uapi structure to kernel only structure - Re-enable interrupt if stepped instruction faults - Modif

Re: [PATCH v3 0/5] ARM64: disable irq between breakpoint and step exception

2017-07-31 Thread Pratyush Anand
Hi James, On Monday 31 July 2017 10:45 PM, James Morse wrote: Hi Pratyush, On 31/07/17 11:40, Pratyush Anand wrote: samples/hw_breakpoint/data_breakpoint.c passes with x86_64 but fails with ARM64. Even though it has been NAKed previously on upstream [1, 2], I have tried to come up with

Re: [PATCH RFC] arm64: introduce mm_context_t flags

2017-07-31 Thread Pratyush Anand
On Monday 31 July 2017 08:18 PM, Yury Norov wrote: - If we start using TIF flags here, we cannot easily add new mm_context specific bits because they may mess with TIF ones. This one seems convincing argument. ATM do you have any mm_context flag which would you like to incorporate?

[PATCH v3 2/5] arm64: use hw_breakpoint_needs_single_step() to decide if step is needed

2017-07-31 Thread Pratyush Anand
fault step handler. hw_breakpoint_needs_single_step() will be true if any hw_breakpoint user wants to use default step handler and sets step_needed in hw_perf_event. Signed-off-by: Pratyush Anand --- arch/arm64/kernel/hw_breakpoint.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) di

[PATCH v3 1/5] hw_breakpoint: Add step_needed event attribute

2017-07-31 Thread Pratyush Anand
introduces a flag 'step_needed' in struct hw_perf_event, so that arch specific code(specially on arm64) can make a decision to enable single stepping. Any architecture which is not using this field will not have any side effect. Signed-off-by: Pratyush Anand --- include/linux/hw_breakp

[PATCH v3 3/5] register_wide_hw_breakpoint(): modify to accept step_needed arg

2017-07-31 Thread Pratyush Anand
hey do not use it so far. Signed-off-by: Pratyush Anand --- arch/x86/kernel/kgdb.c | 2 +- include/linux/hw_breakpoint.h | 4 ++-- kernel/events/hw_breakpoint.c | 4 +++- samples/hw_breakpoint/data_breakpoint.c | 3 ++- 4 files changed, 8 insertions(+), 5

[PATCH v3 4/5] arm64: disable irq between breakpoint and step exception

2017-07-31 Thread Pratyush Anand
breakpoint. Interrupt will be disabled if kgdb or kprobe breakpoint handler requires a single stepping. Signed-off-by: Pratyush Anand --- arch/arm64/kernel/debug-monitors.c | 3 +++ arch/arm64/kernel/hw_breakpoint.c | 4 ++-- arch/arm64/mm/fault.c | 22 ++ 3 files

[PATCH v3 5/5] arm64: fault: re-enable irq if it was disabled for single stepping

2017-07-31 Thread Pratyush Anand
stepping. Signed-off-by: Pratyush Anand --- arch/arm64/mm/fault.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index ce5290dacba3..2b88807eb964 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -589,6

[PATCH v3 0/5] ARM64: disable irq between breakpoint and step exception

2017-07-31 Thread Pratyush Anand
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-April/425266.html Pratyush Anand (5): hw_breakpoint: Add step_needed event attribute arm64: use hw_breakpoint_needs_single_step() to decide if step is needed register_wide_hw_breakpoint(): modify to accept step_needed arg arm64:

Re: [PATCH V2 1/4] hw_breakpoint: Add step_needed event attribute

2017-07-25 Thread Pratyush Anand
On Tuesday 25 July 2017 06:57 PM, Will Deacon wrote: On Fri, Jul 07, 2017 at 05:33:57PM +0530, Pratyush Anand wrote: Architecture like ARM64 currently allows to use default hw breakpoint single step handler only to perf. However, some other users like few systemtap tests or kernel test in

Re: [PATCH V2 4/4] arm64: disable irq between breakpoint and step exception

2017-07-25 Thread Pratyush Anand
Hi Will, Thanks for your review. On Tuesday 25 July 2017 06:55 PM, Will Deacon wrote: On Fri, Jul 07, 2017 at 05:34:00PM +0530, Pratyush Anand wrote: If an interrupt is generated between breakpoint and step handler then step handler can not get correct step address. This situation can easily

Re: [PATCH V2 0/4] ARM64: Fix irq generation between breakpoint and step exception

2017-07-16 Thread Pratyush Anand
On Friday 07 July 2017 05:33 PM, Pratyush Anand wrote: v1 was here http://marc.info/?l=linux-arm-kernel&m=149910958418708&w=2 v1 -> v2: - patch 1 of v1 has been modified to patch 1-3 of v2. - Introduced a new event attribute step_needed and implemented hw_breakpoint_needs_

Re: [PATCH] usb: gadget: functions: add ftrace export over USB

2017-07-13 Thread Pratyush Anand
Hi Felipe, On Friday 09 June 2017 03:58 PM, Felipe Balbi wrote: Felipe Balbi writes: Allow for ftrace data to be exported over a USB Gadget Controller. With this, we have a potentially very fast pipe for transmitting ftrace data to a Host PC for further analysis. Note that in order to decode

Re: [PATCH] usb: gadget: functions: add ftrace export over USB

2017-07-13 Thread Pratyush Anand
Hi Felipe, On Friday 09 June 2017 11:43 AM, Felipe Balbi wrote: +static void notrace ftrace_write(struct trace_export *ftrace, const void *buf, +unsigned int len) +{ + struct usb_ftrace *trace = ftrace_to_trace(ftrace); + struct usb_reque

[PATCH V2 2/4] arm64: use hw_breakpoint_needs_single_step() to decide if step is needed

2017-07-07 Thread Pratyush Anand
fault step handler. hw_breakpoint_needs_single_step() will be true if any hw_breakpoint user wants to use default step handler and sets step_needed in attribute. Signed-off-by: Pratyush Anand --- arch/arm64/kernel/hw_breakpoint.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --

[PATCH V2 3/4] hw-breakpoint: sample test: set step_needed bit field

2017-07-07 Thread Pratyush Anand
arch like ARM64 expects 'step_needed == true' in order to use default single step handler. Therefore, set the bit field in the test case. Other arch will not have any affect as they do not use it so far. Signed-off-by: Pratyush Anand --- samples/hw_breakpoint/data_breakpoint.c | 1

[PATCH V2 0/4] ARM64: Fix irq generation between breakpoint and step exception

2017-07-07 Thread Pratyush Anand
ssue. This patchset attempts to resolve both the issue. Please review. [1] http://marc.info/?l=linux-arm-kernel&m=149580777524910&w=2 [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-April/425266.html Pratyush Anand (4): hw_breakpoint: Add step_needed event att

[PATCH V2 4/4] arm64: disable irq between breakpoint and step exception

2017-07-07 Thread Pratyush Anand
do_debug_exception() that whether a step exception will be followed or not. If there will a step exception then disable irq. Re-enable it after single step handling. Signed-off-by: Pratyush Anand --- arch/arm64/kernel/debug-monitors.c | 3 +++ arch/arm64/kernel/hw_breakpoint.c | 4 ++-- arch/arm64/mm/fault.c

[PATCH V2 1/4] hw_breakpoint: Add step_needed event attribute

2017-07-07 Thread Pratyush Anand
. Signed-off-by: Pratyush Anand --- include/linux/hw_breakpoint.h | 6 ++ include/uapi/linux/perf_event.h | 3 ++- kernel/events/core.c | 2 ++ tools/include/uapi/linux/perf_event.h | 3 ++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/linux

Re: [RFC, 2/2] kallsyms: Do not display SyS_foo() syscall aliases in kallsyms

2017-06-15 Thread Pratyush Anand
On Thursday 15 June 2017 08:00 PM, Steven Rostedt wrote: On Thu, 15 Jun 2017 19:56:40 +0530 Pratyush Anand wrote: From: Steven Rostedt Hi Steve, Is there any plan for next revision of this patchset. Heh, I forgot about this. Actually, I didn't. I was just thinking about the iss

Re: [RFC, 2/2] kallsyms: Do not display SyS_foo() syscall aliases in kallsyms

2017-06-15 Thread Pratyush Anand
On Thursday 15 June 2017 07:56 PM, Pratyush Anand wrote: From: Steven Rostedt Sorry, Please ignore this. I did not had this patch in my inbox and replied through patchwork mailbox. Forgot to change the "from" field. Here is the patch link, which could resolve issues with trace

[RFC, 2/2] kallsyms: Do not display SyS_foo() syscall aliases in kallsyms

2017-06-15 Thread Pratyush Anand
From: Steven Rostedt Hi Steve, Is there any plan for next revision of this patchset. Regards Pratyush

[PATCH] mei: make sysfs modalias format similar as uevent modalias

2017-05-24 Thread Pratyush Anand
uevent modalias as mei:S:uuid:N:*, however sysfs modalias is still in formmat mei:S:uuid:*. This patch equates format of uevent and sysfs modalias so that modprobe is able to resolve the aliases. Signed-off-by: Pratyush Anand --- drivers/misc/mei/bus.c | 4 +++- 1 file changed, 3 insertions(+), 1

Re: [PATCH v2] kexec/kdump: Minor Documentation updates for arm64 and Image

2017-05-22 Thread Pratyush Anand
s used for ARM64. Signed-off-by: Bharat Bhushan --- v1->v2 - "a uncompressed" replaced with "an uncompressed" Reviewed-by: Pratyush Anand Documentation/kdump/kdump.txt | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Documentation/kdum

Re: [PATCH] kexec/kdump: Minor Documentation updates for arm64 and Image

2017-05-22 Thread Pratyush Anand
On Monday 22 May 2017 12:19 PM, Bharat Bhushan wrote: On Friday 19 May 2017 09:15 AM, AKASHI Takahiro wrote: +to load dump-capture kernel. + + kexec -p \ + --initrd= \ + --append="root= " For uncompressed Image, dtb is not necessary? Just for clarification, dtb is optional for both vm

Re: [PATCH] kexec/kdump: Minor Documentation updates for arm64 and Image

2017-05-21 Thread Pratyush Anand
On Friday 19 May 2017 09:15 AM, AKASHI Takahiro wrote: +to load dump-capture kernel. + + kexec -p \ + --initrd= \ + --append="root= " For uncompressed Image, dtb is not necessary? Just for clarification, dtb is optional for both vmlinux and Image on arm64. (This means you can specify i

Re: [PATCH 1/2] perf probe: Fix wrong register name for arm64

2017-05-03 Thread Pratyush Anand
Just noticed that this patch fixes commit e47392bf9c06 (v4.8+). So, Ccing sta...@vger.kernel.org [e47392bf9c06 perf uprobe: Skip prologue if program compiled without optimization] After e47392bf9c06 on ARM64: # cat > test.c << EOF > #include > > int main(int argc, void **argv) > { > print

Re: [trace-cmd Patch RFC] trace-cmd: top: A new interface to detect peak memory

2017-04-27 Thread Pratyush Anand
On Thursday 27 April 2017 10:19 PM, Steven Rostedt wrote: On Thu, 27 Apr 2017 19:32:43 +0530 Pratyush Anand wrote: I will implement your review comments and will send next revision. However, I had couple of observation which I was unable to justify: # ./trace-cmd top -s /tmp/test # ./trace

Re: [trace-cmd Patch RFC] trace-cmd: top: A new interface to detect peak memory

2017-04-27 Thread Pratyush Anand
Hi Steve, On Wednesday 26 April 2017 07:31 PM, Steven Rostedt wrote: Sorry for the late reply. I finally have time to start looking at trace-cmd again. Thanks a lot for your review :-) On Wed, 1 Mar 2017 20:32:37 +0530 Pratyush Anand wrote: [...] This is as nice idea, but it needs

[trace-cmd Patch RFC] trace-cmd: top: A new interface to detect peak memory

2017-03-01 Thread Pratyush Anand
orkManager 15912 gnome-shell 114292 gnome-shell 186356 firefox 853244 bash5984 thunderbird 1896396 kworker/3:0 0 kworker/u16:1 0 trace-cmd 256 Signed-off-by: Pratyush Anand ---

Re: [PATCH] /proc/kcore: Update physical address for kcore ram and text

2017-02-23 Thread Pratyush Anand
Hi Andrew/Kees, On Tuesday 14 February 2017 07:16 AM, Pratyush Anand wrote: Well, CONFIG_PROC_KCORE is a generalized root KASLR exposure (though there are lots of such exposures). Why is the actual physical address needed? Can this just report the virtual address instead? Then the tool can

Re: [PATCH] /proc/kcore: Update physical address for kcore ram and text

2017-02-13 Thread Pratyush Anand
On Tuesday 14 February 2017 03:55 AM, Kees Cook wrote: On Mon, Jan 30, 2017 at 11:00 AM, Pratyush Anand wrote: CCing Andrew and Kees for their review comments. On Wednesday 25 January 2017 10:14 AM, Pratyush Anand wrote: Currently all the p_paddr of PT_LOAD headers are assigned to 0

Re: [PATCH] /proc/kcore: Update physical address for kcore ram and text

2017-01-24 Thread Pratyush Anand
Hi Dave, On Wednesday 25 January 2017 11:59 AM, Dave Young wrote: Hi Pratyush On 01/25/17 at 10:14am, Pratyush Anand wrote: Currently all the p_paddr of PT_LOAD headers are assigned to 0, which is not true and could be misleading, since 0 is a valid physical address. I do not know the history

[PATCH] /proc/kcore: Update physical address for kcore ram and text

2017-01-24 Thread Pratyush Anand
such regions. It also sets an invalid paddr (-1) for other regions, so that user space tool can know whether a physical address provided in PT_LOAD is correct or not. Signed-off-by: Pratyush Anand --- fs/proc/kcore.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/proc

[PATCH V3 0/5] ARM64: More flexible HW watchpoint

2016-11-14 Thread Pratyush Anand
corresponding test case to test that functionality. Pavel Labath (1): arm64: hw_breakpoint: Handle inexact watchpoint addresses Pratyush Anand (4): hw_breakpoint: Allow watchpoint of length 3,5,6 and 7 arm64: Allow hw watchpoint at varied offset from base address arm64: Allow hw watchpoint of

[PATCH V3 5/5] selftests: arm64: add test for unaligned/inexact watchpoint handling

2016-11-14 Thread Pratyush Anand
series and is passing now. Signed-off-by: Pavel Labath Signed-off-by: Pratyush Anand --- tools/testing/selftests/breakpoints/Makefile | 5 +- .../selftests/breakpoints/breakpoint_test_arm64.c | 236 + 2 files changed, 240 insertions(+), 1 deletion(-) create mode 100644

[PATCH V3 3/5] arm64: hw_breakpoint: Handle inexact watchpoint addresses

2016-11-14 Thread Pratyush Anand
reworked to rebase on his patches] Signed-off-by: Pavel Labath Signed-off-by: Pratyush Anand --- arch/arm64/kernel/hw_breakpoint.c | 96 --- 1 file changed, 69 insertions(+), 27 deletions(-) diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/ker

[PATCH V3 4/5] arm64: Allow hw watchpoint of length 3,5,6 and 7

2016-11-14 Thread Pratyush Anand
Since, arm64 can support all offset within a double word limit. Therefore, now support other lengths within that range as well. Signed-off-by: Pratyush Anand --- arch/arm64/include/asm/hw_breakpoint.h | 4 arch/arm64/kernel/hw_breakpoint.c | 36 ++ 2

[PATCH V3 2/5] arm64: Allow hw watchpoint at varied offset from base address

2016-11-14 Thread Pratyush Anand
a watchpoint exception. Currently, we do not have such modularity. We can only program byte, halfword, word and double word access exception from any base address. This patch adds support to overcome above limitations. Signed-off-by: Pratyush Anand --- arch/arm64/include/asm/hw_breakpoint.h

[PATCH V3 1/5] hw_breakpoint: Allow watchpoint of length 3,5,6 and 7

2016-11-14 Thread Pratyush Anand
generic layer. Signed-off-by: Pratyush Anand --- include/uapi/linux/hw_breakpoint.h | 4 tools/include/uapi/linux/hw_breakpoint.h | 4 2 files changed, 8 insertions(+) diff --git a/include/uapi/linux/hw_breakpoint.h b/include/uapi/linux/hw_breakpoint.h index b04000a2296a

Re: [PATCH V2 2/5] arm64: Allow hw watchpoint at varied offset from base address

2016-11-09 Thread Pratyush Anand
Hi Will, Thanks a lot for your review. On Tuesday 08 November 2016 08:56 AM, Will Deacon wrote: Hi Pratyush, On Thu, Oct 20, 2016 at 11:18:14AM +0530, Pratyush Anand wrote: ARM64 hardware supports watchpoint at any double word aligned address. However, it can select any consecutive bytes

Re: [PATCH V2 3/5] arm64: hw_breakpoint: Handle inexact watchpoint addresses

2016-11-09 Thread Pratyush Anand
On Tuesday 08 November 2016 05:28 PM, Pavel Labath wrote: + if (min_dist > 0 && min_dist != -1) { >> + /* No exact match found. */ >> + wp = slots[closest_match]; >> + info = counter_arch_bp(wp); >> + info->trigger = addr; >> + per

Re: [PATCH V3 0/6] ARM64: Uprobe support added

2016-11-07 Thread Pratyush Anand
On Monday 07 November 2016 05:09 PM, Catalin Marinas wrote: diff --git a/arch/arm64/kernel/probes/decode-insn.c > b/arch/arm64/kernel/probes/decode-insn.c > index 8a29d29..6bf6657 100644 > --- a/arch/arm64/kernel/probes/decode-insn.c > +++ b/arch/arm64/kernel/probes/decode-insn.c > @@ -17,7 +17

Re: [PATCH V3 0/6] ARM64: Uprobe support added

2016-11-04 Thread Pratyush Anand
On Saturday 05 November 2016 12:16 AM, Catalin Marinas wrote: On Fri, Nov 04, 2016 at 11:49:51AM -0600, Catalin Marinas wrote: On Wed, Nov 02, 2016 at 02:40:40PM +0530, Pratyush Anand wrote: Pratyush Anand (6): arm64: kprobe: protect/rename few definitions to be reused by uprobe arm64

Re: [PATCH V3 2/6] arm64: kgdb_step_brk_fn: ignore other's exception

2016-11-02 Thread Pratyush Anand
On Wednesday 02 November 2016 03:30 PM, Sandeepa Prabhu wrote: On Wed, Nov 2, 2016 at 2:40 PM, Pratyush Anand mailto:pan...@redhat.com>> wrote: ARM64 step exception does not have any syndrome information. So, it is responsibility of exception handler to take care that they han

[PATCH V3 6/6] arm64: Add uprobe support

2016-11-02 Thread Pratyush Anand
sev, wfe etc. 5. trapped and abort xol path 6. probe at unaligned user address. 7. longjump test cases Currently it does not support aarch32 instruction probing. Signed-off-by: Pratyush Anand --- arch/arm64/Kconfig | 3 + arch/arm64/include/asm/cacheflush.h

[PATCH V3 5/6] arm64: introduce mm context flag to keep 32 bit task information

2016-11-02 Thread Pratyush Anand
load sets personality for 32 bit or 64 bit respectively. Signed-off-by: Pratyush Anand --- arch/arm64/include/asm/elf.h | 12 ++-- arch/arm64/include/asm/mmu.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm

[PATCH V3 4/6] arm64: Handle TRAP_BRKPT for user mode as well

2016-11-02 Thread Pratyush Anand
uprobe is registered at break_hook with a unique ESR code. So, when a TRAP_BRKPT occurs, call_break_hook checks if it was for uprobe. If not, then send a SIGTRAP to user. Signed-off-by: Pratyush Anand --- arch/arm64/kernel/debug-monitors.c | 18 +++--- 1 file changed, 11 insertions

[PATCH V3 1/6] arm64: kprobe: protect/rename few definitions to be reused by uprobe

2016-11-02 Thread Pratyush Anand
probe code accordingly. Function arm_probe_decode_insn() will be needed by uprobe as well. So make it global. Signed-off-by: Pratyush Anand --- arch/arm64/include/asm/probes.h| 19 ++ arch/arm64/kernel/probes/decode-insn.c | 32 -- arch/arm64/ker

[PATCH V3 0/6] ARM64: Uprobe support added

2016-11-02 Thread Pratyush Anand
not yet supported. Pratyush Anand (6): arm64: kprobe: protect/rename few definitions to be reused by uprobe arm64: kgdb_step_brk_fn: ignore other's exception arm64: Handle TRAP_TRACE for user mode as well arm64: Handle TRAP_BRKPT for user mode as well arm64: introduce mm context fl

[PATCH V3 2/6] arm64: kgdb_step_brk_fn: ignore other's exception

2016-11-02 Thread Pratyush Anand
registered as well. This patch fixes kgdb_step_brk_fn() to return error in case of step handler was not meant for kgdb. Signed-off-by: Pratyush Anand --- arch/arm64/kernel/kgdb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/kernel/kgdb.c b/arch/arm64/kernel/kgdb.c index

[PATCH V3 3/6] arm64: Handle TRAP_TRACE for user mode as well

2016-11-02 Thread Pratyush Anand
uprobe registers a handler at step_hook. So, single_step_handler now checks for user mode as well if there is a valid hook. Signed-off-by: Pratyush Anand --- arch/arm64/kernel/debug-monitors.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/arch

Re: [PATCH V2 6/6] arm64: Add uprobe support

2016-10-31 Thread Pratyush Anand
Hi Catalin, On Sun, Oct 30, 2016 at 7:39 PM, Catalin Marinas wrote: > On Tue, Sep 27, 2016 at 01:18:00PM +0530, Pratyush Anand wrote: >> --- /dev/null >> +++ b/arch/arm64/kernel/probes/uprobes.c >> @@ -0,0 +1,221 @@ >> +/* >> + * Copyright (C) 2014-2016 Pratyush

Re: [PATCH V2 0/6] ARM64: Uprobe support added

2016-10-25 Thread Pratyush Anand
Hi Catalin, Please let me know if everything else other than is_trap_insn() looks fine to you. May be I can work well in time. It would be great if we can make it into v4.9. ~Pratyush On Tue, Sep 27, 2016 at 1:17 PM, Pratyush Anand wrote: > Changes since v1: > * Exposed sync_icache_a

[PATCH V2 4/5] arm64: Allow hw watchpoint of length 3,5,6 and 7

2016-10-19 Thread Pratyush Anand
Since, arm64 can support all offset within a double word limit. Therefore, now support other lengths within that range as well. Signed-off-by: Pratyush Anand --- arch/arm64/include/asm/hw_breakpoint.h | 4 arch/arm64/kernel/hw_breakpoint.c | 36 ++ 2

[PATCH V2 5/5] selftests: arm64: add test for unaligned/inexact watchpoint handling

2016-10-19 Thread Pratyush Anand
series and is passing now. Signed-off-by: Pavel Labath Signed-off-by: Pratyush Anand --- tools/testing/selftests/breakpoints/Makefile | 5 +- .../selftests/breakpoints/breakpoint_test_arm64.c | 236 + 2 files changed, 240 insertions(+), 1 deletion(-) create mode 100644

[PATCH V2 2/5] arm64: Allow hw watchpoint at varied offset from base address

2016-10-19 Thread Pratyush Anand
a watchpoint exception. Currently, we do not have such modularity. We can only program byte, halfword, word and double word access exception from any base address. This patch adds support to overcome above limitations. Signed-off-by: Pratyush Anand --- arch/arm64/include/asm/hw_breakpoint.h

[PATCH V2 1/5] hw_breakpoint: Allow watchpoint of length 3,5,6 and 7

2016-10-19 Thread Pratyush Anand
generic layer. Signed-off-by: Pratyush Anand --- include/uapi/linux/hw_breakpoint.h | 4 tools/include/uapi/linux/hw_breakpoint.h | 4 2 files changed, 8 insertions(+) diff --git a/include/uapi/linux/hw_breakpoint.h b/include/uapi/linux/hw_breakpoint.h index b04000a2296a

[PATCH V2 0/5] ARM64: More flexible HW watchpoint

2016-10-19 Thread Pratyush Anand
report a watchpoint hit with the address that matches one of the watchpoints set. Added corresponding test case to test that functionality. Pavel Labath (1): arm64: hw_breakpoint: Handle inexact watchpoint addresses Pratyush Anand (4): hw_breakpoint: Allow watchpoint of length 3,5,6 and 7

[PATCH V2 3/5] arm64: hw_breakpoint: Handle inexact watchpoint addresses

2016-10-19 Thread Pratyush Anand
reworked to rebase on his patches] Signed-off-by: Pavel Labath Signed-off-by: Pratyush Anand --- arch/arm64/kernel/hw_breakpoint.c | 94 +++ 1 file changed, 66 insertions(+), 28 deletions(-) diff --git a/arch/arm64/kernel/hw_breakpoint.c b/arch/arm64/ker

Re: [PATCH 3/4] arm64: Allow hw watchpoint of length 3,5,6 and 7

2016-10-13 Thread Pratyush Anand
On Wednesday 12 October 2016 04:46 PM, Yao Qi wrote: On Wed, Oct 12, 2016 at 6:58 AM, Pratyush Anand wrote: Since, arm64 can support all offset within a double word limit. Therefore, now support other lengths within that range as well. How does ptracer (like GDB) detect kernel has already

Re: [PATCH] kexec: Export memory sections virtual addresses to vmcoreinfo

2016-10-12 Thread Pratyush Anand
On Wednesday 12 October 2016 05:56 AM, Baoquan He wrote: PAGE_OFFSET can be get via vaddr - paddr from elf pt_loads so only > VMALLOC_BASE and VMEMMAP_BASE is necessary.. Well, yes, I was wrong. I wrongly thought of kernel text virtual address when I wrote the reply So, if you can get PAGE_O

[PATCH 0/4] ARM64: More flexible HW watchpoint

2016-10-11 Thread Pratyush Anand
Currently, we do not support all the byte select option provided by ARM64 specs for a HW watchpoint. This patch set will help user to instrument a watchpoint with all possible byte select options. Pratyush Anand (4): hw_breakpoint: Allow watchpoint of length 3,5,6 and 7 arm64: Allow hw

[PATCH 1/4] hw_breakpoint: Allow watchpoint of length 3,5,6 and 7

2016-10-11 Thread Pratyush Anand
generic layer. Signed-off-by: Pratyush Anand --- include/uapi/linux/hw_breakpoint.h | 4 tools/include/uapi/linux/hw_breakpoint.h | 4 2 files changed, 8 insertions(+) diff --git a/include/uapi/linux/hw_breakpoint.h b/include/uapi/linux/hw_breakpoint.h index b04000a2296a

[PATCH 4/4] selftests: arm64: add test for unaligned watchpoint address handling

2016-10-11 Thread Pratyush Anand
: Pratyush Anand --- tools/testing/selftests/breakpoints/Makefile | 5 +- .../selftests/breakpoints/breakpoint_test_arm64.c | 223 + 2 files changed, 227 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/breakpoints/breakpoint_test_arm64.c diff

[PATCH 2/4] arm64: Allow hw watchpoint at varied offset from base address

2016-10-11 Thread Pratyush Anand
a watchpoint exception. Currently, we do not have such modularity. We can only program byte, halfword, word and double word access exception from any base address. This patch adds support to overcome above limitations. Signed-off-by: Pratyush Anand --- arch/arm64/include/asm/hw_breakpoint.h

[PATCH 3/4] arm64: Allow hw watchpoint of length 3,5,6 and 7

2016-10-11 Thread Pratyush Anand
Since, arm64 can support all offset within a double word limit. Therefore, now support other lengths within that range as well. Signed-off-by: Pratyush Anand --- arch/arm64/include/asm/hw_breakpoint.h | 4 arch/arm64/kernel/hw_breakpoint.c | 36 ++ 2

Re: [PATCH 5/5] arm64: Add uprobe support

2016-09-27 Thread Pratyush Anand
On Tuesday 27 September 2016 07:21 PM, Catalin Marinas wrote: Looking at prepare_uprobe(), we have a weak is_trap_insn() function. > > > > This check is meaningless without knowing which instruction set we > > > > target. A false positive here, however, is not that bad as we wouldn't > > > > end

[PATCH V2 6/6] arm64: Add uprobe support

2016-09-27 Thread Pratyush Anand
sev, wfe etc. 5. trapped and abort xol path 6. probe at unaligned user address. 7. longjump test cases Currently it does not support aarch32 instruction probing. Signed-off-by: Pratyush Anand --- arch/arm64/Kconfig | 3 + arch/arm64/include/asm/cacheflush.h

[PATCH V2 3/6] arm64: Handle TRAP_TRACE for user mode as well

2016-09-27 Thread Pratyush Anand
uprobe registers a handler at step_hook. So, single_step_handler now checks for user mode as well if there is a valid hook. Signed-off-by: Pratyush Anand --- arch/arm64/kernel/debug-monitors.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/arch

[PATCH V2 2/6] arm64: kgdb_step_brk_fn: ignore other's exception

2016-09-27 Thread Pratyush Anand
registered as well. This patch fixes kgdb_step_brk_fn() to return error in case of step handler was not meant for kgdb. Signed-off-by: Pratyush Anand --- arch/arm64/kernel/kgdb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/kernel/kgdb.c b/arch/arm64/kernel/kgdb.c index

[PATCH V2 1/6] arm64: kprobe: protect/rename few definitions to be reused by uprobe

2016-09-27 Thread Pratyush Anand
probe code accordingly. Function arm_probe_decode_insn() will be needed by uprobe as well. So make it global. Signed-off-by: Pratyush Anand --- arch/arm64/include/asm/probes.h| 19 ++ arch/arm64/kernel/probes/decode-insn.c | 32 -- arch/arm64/ker

[PATCH V2 4/6] arm64: Handle TRAP_BRKPT for user mode as well

2016-09-27 Thread Pratyush Anand
uprobe is registered at break_hook with a unique ESR code. So, when a TRAP_BRKPT occurs, call_break_hook checks if it was for uprobe. If not, then send a SIGTRAP to user. Signed-off-by: Pratyush Anand --- arch/arm64/kernel/debug-monitors.c | 18 +++--- 1 file changed, 11 insertions

[PATCH V2 5/6] arm64: introduce mm context flag to keep 32 bit task information

2016-09-27 Thread Pratyush Anand
load sets personality for 32 bit or 64 bit respectively. Signed-off-by: Pratyush Anand --- arch/arm64/include/asm/elf.h | 12 ++-- arch/arm64/include/asm/mmu.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm

[PATCH V2 0/6] ARM64: Uprobe support added

2016-09-27 Thread Pratyush Anand
, ldr, add etc. 2. Simulation-able like ret, cbnz, cbz etc. 3. uretprobe 4. Reject-able instructions like sev, wfe etc. 5. trapped and abort xol path 6. probe at unaligned user address. 7. longjump test cases aarch32 task probing is not yet supported. Pratyush Anand (6): arm64: kprobe: protect

Re: [PATCH 5/5] arm64: Add uprobe support

2016-09-26 Thread Pratyush Anand
On 26/09/2016:12:01:59 PM, Catalin Marinas wrote: > On Sun, Sep 25, 2016 at 10:32:28PM +0530, Pratyush Anand wrote: > > On Fri, Sep 23, 2016 at 6:35 PM, Catalin Marinas > > wrote: > > > On Fri, Sep 23, 2016 at 09:42:30AM +0530, Pratyush Anand wrote: > > >>

Re: [PATCH 5/5] arm64: Add uprobe support

2016-09-25 Thread Pratyush Anand
On Fri, Sep 23, 2016 at 6:35 PM, Catalin Marinas wrote: > On Fri, Sep 23, 2016 at 09:42:30AM +0530, Pratyush Anand wrote: >> On 22/09/2016:05:50:30 PM, Catalin Marinas wrote: >> > On Thu, Sep 22, 2016 at 08:53:28AM +0530, Pratyush Anand wrote: >> > > On 21/09/201

Re: [PATCH 5/5] arm64: Add uprobe support

2016-09-22 Thread Pratyush Anand
On 22/09/2016:05:50:30 PM, Catalin Marinas wrote: > On Thu, Sep 22, 2016 at 08:53:28AM +0530, Pratyush Anand wrote: > > On 21/09/2016:06:04:04 PM, Catalin Marinas wrote: > > > On Wed, Sep 21, 2016 at 04:30:47PM +0530, Pratyush Anand wrote: > > > > On 20/09/2016:05:5

Re: [PATCH 5/5] arm64: Add uprobe support

2016-09-21 Thread Pratyush Anand
On 21/09/2016:06:04:04 PM, Catalin Marinas wrote: > On Wed, Sep 21, 2016 at 04:30:47PM +0530, Pratyush Anand wrote: > > On 20/09/2016:05:59:46 PM, Catalin Marinas wrote: > > > > +int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct

Re: [PATCH 5/5] arm64: Add uprobe support

2016-09-21 Thread Pratyush Anand
Hi Catalin, Thanks for your review. On 20/09/2016:05:59:46 PM, Catalin Marinas wrote: > Hi Pratyush, > > On Tue, Aug 02, 2016 at 11:00:09AM +0530, Pratyush Anand wrote: > > --- a/arch/arm64/include/asm/debug-monitors.h > > +++ b/arch/arm64/include/asm/debug-monitors

Re: [PATCH 0/5] ARM64: Uprobe support added

2016-09-19 Thread Pratyush Anand
24, 2016 at 12:56 PM, Pratyush Anand wrote: > Hi Will/Catalin, > > Do you have any specific comment for this patch set? > > ~Pratyush > > [1] https://lkml.org/lkml/2016/8/22/69 > > On 02/08/2016:11:00:04 AM, Pratyush Anand wrote: >> ARM64 kprobe support is lying in t

Re: [PATCH] arm64: kprobe: Always clear pstate.D in breakpoint exception handler

2016-09-15 Thread Pratyush Anand
On Thu, Sep 15, 2016 at 9:48 PM, Will Deacon wrote: > On Thu, Sep 15, 2016 at 09:45:09PM +0530, Pratyush Anand wrote: >> On Wed, Aug 24, 2016 at 3:36 PM, Pratyush Anand wrote: >> > On 23/08/2016:04:33:08 PM, Sandeepa Prabhu wrote: >> >> Thanks for the fix, feel free

Re: [PATCH] arm64: kprobe: Always clear pstate.D in breakpoint exception handler

2016-09-15 Thread Pratyush Anand
Hi Sandeepa, On Wed, Aug 24, 2016 at 3:36 PM, Pratyush Anand wrote: > Hi Sandeepa, > > Thanks for the review. > > On 23/08/2016:04:33:08 PM, Sandeepa Prabhu wrote: >> Thanks for the fix, feel free to add my ACK as well. Has it been tested on >> guest kernel? &

[PATCH] rtc/rtc-cmos: Initialize hpet timer before irq is registered

2016-09-14 Thread Pratyush Anand
nterrupts, in case IRQ registration fails. We were able to reproduce the problem in maximum 15 trials of kdump secondary kernel boot on an hp-dl160gen8 FCoE host machine without this patch. However, more than 35 trials went fine after applying this patch. Suggested-by: Thomas Gleixner Signed-off-

Re: [PATCH 3/5] arm64: Handle TRAP_HWBRKPT for user mode as well

2016-09-06 Thread Pratyush Anand
On 06/09/2016:05:36:18 PM, David Long wrote: > On 09/06/2016 12:11 PM, Catalin Marinas wrote: > > On Tue, Aug 02, 2016 at 11:00:07AM +0530, Pratyush Anand wrote: > > > --- a/arch/arm64/kernel/debug-monitors.c > > > +++ b/arch/arm64/kernel/debug-monitors.c > >

Re: [PATCH V3 2/2] rtc/rtc-cmos: Initialize software counters before irq is registered

2016-09-06 Thread Pratyush Anand
Hi Thomas, On 06/09/2016:11:58:08 AM, Thomas Gleixner wrote: > On Tue, 16 Aug 2016, Pratyush Anand wrote: > > That's a lot of churn to fix that simple problem. The two liner below > should fix that as well, right? Thanks a lot for your reply. Yes, that should fix. I was n&#

  1   2   3   4   >