*evlist);
+
#endif /* GIT_COMPAT_UTIL_H */
On Friday 25 March 2016 02:45 AM, Arnaldo Carvalho de Melo wrote:
Em Tue, Mar 22, 2016 at 11:19:21PM -0300, Arnaldo Carvalho de Melo escreveu:
Em Tue, Mar 22, 2016 at 04:12:11PM -0300, Arnaldo Carvalho de Melo escreveu:
Em Wed, Feb 24, 2016 at 02:3
was the case before refactoring of code in
aforementioned commit.
This patch is generated from acme perf/core branch.
Below I've mention an example that demonstrate the behaviour before and
after applying patch.
Before applying patch:
[Note: One needs to run guest before recording data in host]
rav
Hi acme,
I sent this patch few days ago. Unfortunately nobody has payed attention.
Can you please pick this up.
Regards,
Ravi
On Monday 07 December 2015 12:25 PM, Ravi Bangoria wrote:
While recording guest samples in host using perf kvm record, it will
populate unprocessable sample error
uest.kernel.kallsyms] [g] .n_tty_write
0.00% :9688[guest.kernel.kallsyms] [g] .plpar_hcall
0.00% :9689[guest.kernel.kallsyms] [g] .__srcu_read_unlock
0.00% :9689[guest.kernel.kallsyms] [g] ._raw_spin_lock
0.00% :9689[guest.kernel.kallsyms] [g]
This patch changes prototype of perf_event__preprocess_sample() with
additional argument evsel added at last.
This change is required because perf_event__preprocess_sample()
function will use evsel to determine cpumode of samples for powerpc
architecture.
Signed-off-by: Ravi Bangoria
:57276 [guest.kernel.kallsyms] [g] ._atomic_dec_and_lock
0.00% :57276 [guest.kernel.kallsyms] [g] ._raw_spin_lock
0.00% :57276 [guest.kernel.kallsyms] [g] ._switch
0.00% :57276 [guest.kernel.kallsyms] [g] .bio_add_page
0.00% :57276 [guest.kernel.kallsyms] [g] .kmem_
epoint and checks the
exit reason for any kvm exit. If it is HV_DECREMENTER, then the
instruction pointer dumped along with this tracepoint is retrieved and
mapped with the guest kallsyms.
Signed-off-by: Ravi Bangoria
Signed-off-by: Hemant Kumar
---
changes in v2:
- Breakdown of v1 patch in
Hi Arnaldo,
On Wednesday 13 January 2016 10:29 PM, Arnaldo Carvalho de Melo wrote:
Em Tue, Dec 29, 2015 at 03:38:40PM +0530, Ravi Bangoria escreveu:
'perf kvm {record|report}' is used to record and report the profiled
performance of any workload on a guest. From the host, we can col
Hi acme,
On Tuesday 02 February 2016 02:36 PM, Ravi Bangoria wrote:
HI acme,
On Tuesday 02 February 2016 02:36 AM, Arnaldo Carvalho de Melo wrote:
Em Fri, Jan 22, 2016 at 11:28:11AM +0530, Ravi Bangoria escreveu:
+return event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
+}
Th
pproach so I've tagged it as RFC
and not following the patch version series.
Ravi Bangoria (4):
perf kvm: Enable 'record' on powerpc
perf kvm: Introduce evsel as argument to perf_event__preprocess_sample
perf kvm: Enable 'report' on powerpc
perf kvm: Fix output fie
This patch changes prototype of perf_event__preprocess_sample() with
additional argument evsel added at the end.
This change is required because perf_event__preprocess_sample()
function will use evsel to determine cpumode of samples for powerpc
architecture.
Signed-off-by: Ravi Bangoria
an
interval of 10 ms.
This patch makes use of the 'kvm_guest_exit' tracepoint and checks the
exit reason for any kvm exit. If it is HV_DECREMENTER, then the
instruction pointer dumped along with this tracepoint is retrieved and
mapped with the guest kallsyms.
Signed-off-by: Ravi Bangor
s] [g] ._atomic_dec_and_lock
0.00% :57276 [guest.kernel.kallsyms] [g] ._raw_spin_lock
0.00% :57276 [guest.kernel.kallsyms] [g] ._switch
0.00% :57276 [guest.kernel.kallsyms] [g] .bio_add_page
0.00% :57276 [guest.kernel.kallsyms] [g] .kmem_cache_alloc
Signed-off-
kvm_hv:kvm_guest_exit for recording
guest data in host on powerpc. As we are using host event to record guest
data, this approach will enable only --guest option of 'perf kvm'. Still
--host --guest together won't work.
Signed-off-by: Ravi Bangoria
---
tools/perf/a
Hi Arnaldo,
Gentle reminder :) Any updates?
Regards,
Ravi
On Thursday 03 March 2016 06:49 AM, Ravi Bangoria wrote:
Thanks acme,
On Wednesday 02 March 2016 09:52 PM, Arnaldo Carvalho de Melo wrote:
Em Wed, Mar 02, 2016 at 09:16:48PM +0530, Ravi Bangoria escreveu:
Thanks Arnaldo,
Please
oo_show in kobject_example)
You can now use it in all perf tools, such as:
perf record -e probe:foo_show -aR sleep 1
$ cat /sys/kernel/debug/tracing/kprobe_events
p:probe/foo_show kobject_example:foo_show
Signed-off-by: Ravi Bangoria
---
tools/perf/util/probe-event.c | 17 ++---
1 fi
pprox.): 8
#
# Overhead Command Shared Object Symbol
# ... .
#
100.00% cat [kobject_example] [k] foo_show
Signed-off-by: Ravi Bangoria
---
tools/perf/util/probe-event.c | 78 +++
tools
oo_show in kobject_example)
You can now use it in all perf tools, such as:
perf record -e probe:foo_show -aR sleep 1
$ cat /sys/kernel/debug/tracing/kprobe_events
p:probe/foo_show kobject_example:foo_show
Signed-off-by: Ravi Bangoria
---
Changes in v2:
- made find_module_name static
tools
pprox.): 8
#
# Overhead Command Shared Object Symbol
# ... .
#
100.00% cat [kobject_example] [k] foo_show
Signed-off-by: Ravi Bangoria
---
tools/perf/util/probe-event.c | 78 +++
tools
Thanks Masami for reviewing.
Please find my replies to your comment.
On Tuesday 26 April 2016 02:54 AM, Masami Hiramatsu wrote:
Hi Ravi,
On Mon, 25 Apr 2016 16:08:27 +0530
Ravi Bangoria wrote:
Perf can add a probe on kernel module which has not been loaded yet.
Current implementation finds
Thanks Masami,
On Tuesday 26 April 2016 07:49 AM, Masami Hiramatsu wrote:
On Tue, 26 Apr 2016 06:24:38 +0900
Masami Hiramatsu wrote:
+/*
+ * NOTE:
+ * '.gnu.linkonce.this_module' section of kernel module elf directly
+ * maps to 'struct module' from linux/module.h. This section contains
+ * ac
On Tuesday 26 April 2016 02:59 AM, Masami Hiramatsu wrote:
On Mon, 25 Apr 2016 16:08:28 +0530
Ravi Bangoria wrote:
Perf is not able to register probe in kernel module when dwarf supprt
is not there(and so it goes for symtab). Perf passes full path of
module where only module name is
On Tuesday 26 April 2016 02:45 PM, Wangnan (F) wrote:
On 2016/4/26 16:56, Ravi Bangoria wrote:
Thanks Masami for reviewing.
Please find my replies to your comment.
On Tuesday 26 April 2016 02:54 AM, Masami Hiramatsu wrote:
Hi Ravi,
On Mon, 25 Apr 2016 16:08:27 +0530
Ravi Bangoria wrote
e 0.105 MB perf.data (2 samples) ]
$ sudo ./perf script
insmod 13990 [002] 5961.216833: probe:kprobe_init: ...
insmod 13995 [002] 5962.889384: probe:kprobe_init: ...
Signed-off-by: Ravi Bangoria
---
tools/perf/util/probe-event.c | 76 +--
1 file c
pprox.): 8
#
# Overhead Command Shared Object Symbol
# ... .
#
100.00% cat [kobject_example] [k] foo_show
Signed-off-by: Ravi Bangoria
---
tools/perf/util/probe-event.c | 19 +--
1 file changed, 5 inserti
On Tuesday 26 April 2016 04:16 PM, Masami Hiramatsu wrote:
On Tue, 26 Apr 2016 14:26:48 +0530
Ravi Bangoria wrote:
Thanks Masami for reviewing.
Please find my replies to your comment.
On Tuesday 26 April 2016 02:54 AM, Masami Hiramatsu wrote:
Hi Ravi,
On Mon, 25 Apr 2016 16:08:27 +0530
On Tuesday 26 April 2016 08:04 PM, Arnaldo Carvalho de Melo wrote:
Em Tue, Apr 26, 2016 at 07:55:40PM +0530, Ravi Bangoria escreveu:
Perf is not able to register probe in kernel module when dwarf supprt
is not there(and so it goes for symtab). Perf passes full path of
module where only module
On 3/18/19 11:56 PM, Arnaldo Carvalho de Melo wrote:
> I added this:
>
> Cc: Sukadev Bhattiprolu
> Fixes: 2a81fa3bb5ed ("perf vendor events: Add power8 PMU events")
>
> - Arnaldo
Sure. Thanks a lot Arnaldo!
I've prepared my patch on top of Christophe's patch as it's easy
to change stepping_handler() rather than hw_breakpoint_handler().
2nd patch is the actual fix.
Christophe Leroy (1):
powerpc/hw_breakpoint: move instruction stepping out of
hw_breakpoint_handler()
Ravi Bangoria
From: Christophe Leroy
On 8xx, breakpoints stop after executing the instruction, so
stepping/emulation is not needed. Move it into a sub-function and
remove the #ifdefs.
Signed-off-by: Christophe Leroy
Reviewed-by: Ravi Bangoria
---
arch/powerpc/kernel/hw_breakpoint.c | 60
forever and ultimately hangs the system.
Note that ptrace anyway works in one-shot mode and thus for ptrace
we don't change the behaviour. It's up to ptrace user to take care
of this.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/kernel/hw_breakpoint.c | 49 +++
forever and ultimately hangs the system.
Note that ptrace anyway works in one-shot mode and thus for ptrace
we don't change the behaviour. It's up to ptrace user to take care
of this.
Signed-off-by: Ravi Bangoria
Acked-by: Naveen N. Rao
---
v1->v2:
- v1:
https://lists.ozlabs.
'node' sort key")
Reported-by: Nageswara R Sastry
Signed-off-by: Ravi Bangoria
---
tools/perf/builtin-c2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 9e6cc86..fc68a94 100644
--- a/tools/perf/builtin-c2
On 8/28/19 11:44 AM, Christophe Leroy wrote:
Le 10/07/2019 à 06:54, Ravi Bangoria a écrit :
ptrace-hwbreak.c selftest is logically broken. On powerpc, when
watchpoint is created with ptrace, signals are generated before
executing the instruction and user has to manually singlestep
the
On 9/4/19 8:12 PM, Naveen N. Rao wrote:
Ravi Bangoria wrote:
On Powerpc64, watchpoint match range is double-word granular. On
a watchpoint hit, DAR is set to the first byte of overlap between
actual access and watched range. And thus it's quite possible that
DAR does not point inside
On 9/4/19 3:17 PM, Srikar Dronamraju wrote:
There are some problems in perf stat when using a combination of repeat and
interval options. This series tries to fix them.
For the series:
Tested-by: Ravi Bangoria
@Christophe, Is patch5 works for you on 8xx?
Getting the following :
root@vgoip:~# ./ptrace-hwbreak
test: ptrace-hwbreak
tags: git_version:v5.4-rc2-710-gf0082e173fe4-dirty
PTRACE_SET_DEBUGREG, WO, len: 1: Ok
PTRACE_SET_DEBUGREG, WO, len: 2: Ok
PTRACE_SET_DEBUGREG, WO, len: 4: Ok
PTRACE_SET_
On 10/10/19 10:14 AM, Ravi Bangoria wrote:
@Christophe, Is patch5 works for you on 8xx?
Getting the following :
root@vgoip:~# ./ptrace-hwbreak
test: ptrace-hwbreak
tags: git_version:v5.4-rc2-710-gf0082e173fe4-dirty
PTRACE_SET_DEBUGREG, WO, len: 1: Ok
PTRACE_SET_DEBUGREG, WO, len: 2: Ok
On 9/25/19 9:36 AM, Ravi Bangoria wrote:
v3: https://lists.ozlabs.org/pipermail/linuxppc-dev/2019-July/193339.html
v3->v4:
- Instead of considering exception as extraneous when dar is outside of
user specified range, analyse the instruction and check for overlap
between u
it
with ep88xc_defconfig.
Ravi Bangoria (5):
Powerpc/Watchpoint: Fix length calculation for unaligned target
Powerpc/Watchpoint: Don't ignore extraneous exceptions blindly
Powerpc/Watchpoint: Rewrite ptrace-hwbreak.c selftest
Powerpc/Watchpoint: Add dar outside test in perf-hwbreak.c selft
success: ptrace-hwbreak
Signed-off-by: Ravi Bangoria
---
.../selftests/powerpc/ptrace/ptrace-hwbreak.c | 571 +++---
1 file changed, 361 insertions(+), 210 deletions(-)
diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c
b/tools/testing/selftests/powerpc/ptrace/ptrace
including next doubleword in the length. Plus, fix
ptrace code which is messing up address/len.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/include/asm/debug.h | 1 +
arch/powerpc/include/asm/hw_breakpoint.h | 9 +++--
arch/powerpc/kernel/dawr.c | 6 ++--
arch/powe
Instead of blindly ignoring the exception, get actual address range
by analysing an instruction, and ignore only if actual range does
not overlap with user specified range.
Note: The behaviour is unchanged for 8xx.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/kernel/hw_breakpo
overlap
TESTED: Partial overlap
TESTED: Partial overlap
TESTED: No overlap
TESTED: Full overlap
success: perf_hwbreak
Signed-off-by: Ravi Bangoria
---
.../selftests/powerpc/ptrace/perf-hwbreak.c | 111 +-
1 file changed, 110 insertions(+), 1 deletion(-)
diff --git a
On the 8xx, signals are generated after executing the instruction.
So no need to manually single-step on 8xx.
Signed-off-by: Ravi Bangoria
---
.../selftests/powerpc/ptrace/ptrace-hwbreak.c | 26 ++-
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/tools/testing
led yet.
v3:
https://lore.kernel.org/linuxppc-dev/20200414031659.58875-1-ravi.bango...@linux.ibm.com
v3->v4:
- Reduce the scope of local variables to increase readability at some
places, suggested by Christophe.
- Added Michael Neuling's Reviewed by for the series.
- Rebased to powerpc/next
R
macro to HBP_NUM_MAX, which will now represent
maximum number of watchpoints supported by Powerpc.
Signed-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/include/asm/cputable.h | 6 +-
arch/powerpc/include/asm/hw_breakpoint.h | 5 +
arch/powerpc/include/asm/proces
Future Power architecture is introducing second DAWR. Add SPRN_ macros
for the same.
Signed-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/include/asm/reg.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm
Introduce new parameter 'nr' to __set_breakpoint() which indicates
which DAWR should be programed. Also convert current_brk variable
to an array.
Signed-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/include/asm/debug.h | 2 +-
arch/powerpc/i
User can ask for num of available watchpoints(dbginfo.num_data_bps)
using ptrace(PPC_PTRACE_GETHWDBGINFO). Return actual number of
available watchpoints on the machine rather than hardcoded 1.
Signed-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/kernel/ptrace/ptrace
Future Power architecture is introducing second DAWR. Use real
register names from ISA for current macros:
s/SPRN_DAWR/SPRN_DAWR0/
s/SPRN_DAWRX/SPRN_DAWRX0/
Signed-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/include/asm/reg.h | 4 ++--
arch/powerpc/kernel
So far powerpc hw supported only one watchpoint. But Future Power
architecture is introducing 2nd DAWR. Convert thread_struct->hw_brk
into an array.
Signed-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/include/asm/processor.h | 2 +-
arch/powerpc/kernel/proces
.
Signed-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/kernel/hw_breakpoint.c | 7 --
arch/powerpc/kernel/process.c | 6 -
arch/powerpc/kernel/ptrace/ptrace-noadv.c | 28 +--
3 files changed, 31 insertions(+), 10 deletions
ime if their address
range overlaps.
Signed-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/include/asm/hw_breakpoint.h | 2 +
arch/powerpc/kernel/hw_breakpoint.c | 221 +++
kernel/events/hw_breakpoint.c| 16 ++
3 files changed, 239
Xmon allows overwriting breakpoints because it's supported by only
one dawr. But with multiple dawrs, overwriting becomes ambiguous
or unnecessary complicated. So let's not allow it.
Signed-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/xmon/xmon.c | 4
1 fi
Add support for 2nd DAWR in xmon. With this, we can have two
simultaneous breakpoints from xmon.
Signed-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/xmon/xmon.c | 101 ++-
1 file changed, 69 insertions(+), 32 deletions(-)
diff --git a
Currently we calculate hw aligned start and end addresses manually.
Replace them with builtin ALIGN_DOWN() and ALIGN() macros.
So far end_addr was inclusive but this patch makes it exclusive (by
avoiding -1) for better readability.
Suggested-by: Christophe Leroy
Signed-off-by: Ravi Bangoria
Introduce is_ptrace_bp() function and move the check inside the
function. We will utilize it more in later set of patches.
Signed-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/kernel/hw_breakpoint.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a
configured for readonly watchpoint and the instruction is store, this
DAWR must not have caused exception.
Signed-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/include/asm/processor.h | 2 +-
arch/powerpc/include/asm/sstep.h | 2 +
arch/powerpc/kernel/hw_breakpoint.c
-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/kernel/dawr.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/dawr.c b/arch/powerpc/kernel/dawr.c
index 8114ad3a8574..500f52fa4711 100644
--- a/arch/powerpc/kernel/dawr.c
+++ b
Instead of disabling only one watchpoint, get num of available
watchpoints dynamically and disable all of them.
Signed-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/include/asm/hw_breakpoint.h | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff
Introduce new parameter 'nr' to set_dawr() which indicates which DAWR
should be programed.
Signed-off-by: Ravi Bangoria
Reviewed-by: Michael Neuling
---
arch/powerpc/include/asm/hw_breakpoint.h | 4 ++--
arch/powerpc/kernel/dawr.c | 15 ++-
arch/powe
On 10/12/19 1:01 PM, Christophe Leroy wrote:
Le 10/10/2019 à 08:25, Ravi Bangoria a écrit :
On 10/10/19 10:14 AM, Ravi Bangoria wrote:
@Christophe, Is patch5 works for you on 8xx?
Getting the following :
root@vgoip:~# ./ptrace-hwbreak
test: ptrace-hwbreak
tags: git_version:v5.4
On 10/12/19 2:21 PM, Christophe Leroy wrote:
Le 10/10/2019 à 06:44, Ravi Bangoria a écrit :
@Christophe, Is patch5 works for you on 8xx?
Getting the following :
root@vgoip:~# ./ptrace-hwbreak
test: ptrace-hwbreak
tags: git_version:v5.4-rc2-710-gf0082e173fe4-dirty
PTRACE_SET_DEBUGREG
We are hadrcoding length everywhere in the watchpoint code.
Introduce macros for the length and use them.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/include/asm/hw_breakpoint.h | 3 +++
arch/powerpc/kernel/hw_breakpoint.c | 4 ++--
arch/powerpc/kernel/ptrace.c | 6
including next doubleword in the length.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/include/asm/hw_breakpoint.h | 2 +
arch/powerpc/kernel/dawr.c | 6 +--
arch/powerpc/kernel/hw_breakpoint.c | 67 +---
arch/powerpc/kernel/process.c| 3 ++
ar
overlap
TESTED: Partial overlap
TESTED: Partial overlap
TESTED: No overlap
TESTED: Full overlap
success: perf_hwbreak
Signed-off-by: Ravi Bangoria
---
.../selftests/powerpc/ptrace/perf-hwbreak.c | 111 +-
1 file changed, 110 insertions(+), 1 deletion(-)
diff --git a
success: ptrace-hwbreak
Signed-off-by: Ravi Bangoria
---
.../selftests/powerpc/ptrace/ptrace-hwbreak.c | 571 +++---
1 file changed, 361 insertions(+), 210 deletions(-)
diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c
b/tools/testing/selftests/powerpc/ptrace/ptrace
second doubleword. So fix that as well.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/include/asm/hw_breakpoint.h | 4 ++--
arch/powerpc/kernel/ptrace.c | 9 +++--
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/include/asm/hw_breakpoint.h
b/arch
Instead of blindly ignoring the exception, get actual address range
by analysing an instruction, and ignore only if actual range does
not overlap with user specified range.
Note: The behavior is unchanged for 8xx.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/kernel/hw_breakpo
not supported with DABR. Test
unaligned watchpoint only when DAWR is present.
Ravi Bangoria (7):
Powerpc/Watchpoint: Introduce macros for watchpoint length
Powerpc/Watchpoint: Fix length calculation for unaligned target
Powerpc/Watchpoint: Fix ptrace code that muck around with address/len
Powe
: Ravi Bangoria
---
.../selftests/powerpc/ptrace/ptrace-hwbreak.c | 32 +--
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c
b/tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c
index 916e97f5f8b1
We are hadrcoding length everywhere in the watchpoint code.
Introduce macros for the length and use them.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/include/asm/hw_breakpoint.h | 3 +++
arch/powerpc/kernel/hw_breakpoint.c | 4 ++--
arch/powerpc/kernel/ptrace.c | 6
[-Werror=strict-aliasing]
temp16 = *((__u16 *)target);
^
Fixed that.
Ravi Bangoria (7):
Powerpc/Watchpoint: Introduce macros for watchpoint length
Powerpc/Watchpoint: Fix length calculation for unaligned target
Powerpc/Watchpoint: Fix ptrace code that muck around with add
Instead of blindly ignoring the exception, get actual address range
by analysing an instruction, and ignore only if actual range does
not overlap with user specified range.
Note: The behavior is unchanged for 8xx.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/kernel/hw_breakpo
including next doubleword in the length.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/include/asm/hw_breakpoint.h | 2 +
arch/powerpc/kernel/dawr.c | 6 +--
arch/powerpc/kernel/hw_breakpoint.c | 67 +---
arch/powerpc/kernel/process.c| 3 ++
ar
: Ravi Bangoria
---
.../selftests/powerpc/ptrace/ptrace-hwbreak.c | 32 +--
1 file changed, 23 insertions(+), 9 deletions(-)
diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c
b/tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c
index 916e97f5f8b1
overlap
TESTED: Partial overlap
TESTED: Partial overlap
TESTED: No overlap
TESTED: Full overlap
success: perf_hwbreak
Signed-off-by: Ravi Bangoria
---
.../selftests/powerpc/ptrace/perf-hwbreak.c | 119 +-
1 file changed, 118 insertions(+), 1 deletion(-)
diff --git a
second doubleword. So fix that as well.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/include/asm/hw_breakpoint.h | 4 ++--
arch/powerpc/kernel/ptrace.c | 9 +++--
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/include/asm/hw_breakpoint.h
b/arch
success: ptrace-hwbreak
Signed-off-by: Ravi Bangoria
---
.../selftests/powerpc/ptrace/ptrace-hwbreak.c | 571 +++---
1 file changed, 361 insertions(+), 210 deletions(-)
diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c
b/tools/testing/selftests/powerpc/ptrace/ptrace
trylock
> fails.
I don't understand binderfs code much so I'll let Sherry comment on this.
>
> In any case, I don't think memalloc_nofs_save() is what we need, see below.
>
> On 02/04, Ravi Bangoria wrote:
>>
>> There can be a deadloc
On 1/29/19 3:23 PM, Arnaldo Carvalho de Melo wrote:
> I think its just a tooling side, I haven't processed it because I'm
> waiting for Ravi to address Jiri's comment, after that I'm happy to put
> it in my perf/urgent branch that I'm brewing to push to Ingo today or
> tomorrow.
Ah.. Will try to
://lists.ozlabs.org/pipermail/linuxppc-dev/2018-December/182596.html
Signed-off-by: Ravi Bangoria
---
tools/perf/Documentation/perf-c2c.txt | 16
tools/perf/Documentation/perf-mem.txt | 2 +-
tools/perf/arch/powerpc/util/Build| 1 +
tools/perf/arch/powerpc/util/mem-events.c | 11
nal change.
>>
>> Fix indentation issue, replace spaces with tab
>>
>> Signed-off-by: Seeteena Thoufeek
>> Reviewed-by: Ravi Bangoria
>
> hum, could you please add some info about testing those changes?
> (or even some global into 0/.. patch)
>
> thi
://lists.ozlabs.org/pipermail/linuxppc-dev/2018-December/182596.html
Signed-off-by: Ravi Bangoria
---
tools/perf/Documentation/perf-c2c.txt | 16
tools/perf/Documentation/perf-mem.txt | 2 +-
tools/perf/arch/x86/util/Build| 1 +
tools/perf/arch/x86/util/mem-events.c | 25
On 1/21/19 12:44 AM, Tony Jones wrote:
> While updating Perf to work with Python3 and Python2 I noticed that the
> stat-cpi script was dumping core.
[...]
> Fixes: 1fcd03946b52 ("perf stat: Update per-thread shadow stats")
> Signed-off-by: Tony Jones
Tested-by: Ravi Bangoria
On 2/1/19 1:24 PM, Ravi Bangoria wrote:
> I ran fuzzer for couple of hours but I didn't see any crash with
> your previous patch.
>
> I'll try this newer one as well.
I ran fuzzer for ~8 hrs and no lockup so far.
Thanks.
sh Kumar K.V
Signed-off-by: Ravi Bangoria
---
kernel/events/uprobes.c | 24
1 file changed, 24 insertions(+)
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 8aef47ee7bfa..8be39a83d83a 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobe
nfig_bhrb(-1) will set mmcra to -1.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/perf/core-book3s.c | 6 --
arch/powerpc/perf/power8-pmu.c | 3 +++
arch/powerpc/perf/power9-pmu.c | 3 +++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/perf/core-book3s.c b/arc
Add a check for sample_period value sent from userspace. Negative
value does not make sense. And in powerpc arch code this could cause
a recursive PMI leading to a hang (reported when running perf-fuzzer).
Signed-off-by: Ravi Bangoria
---
kernel/events/core.c | 3 +++
1 file changed, 3
On 5/11/19 8:12 AM, Ravi Bangoria wrote:
> Consider a scenario where user creates two events:
>
> 1st event:
> attr.sample_type |= PERF_SAMPLE_BRANCH_STACK;
> attr.branch_sample_type = PERF_SAMPLE_BRANCH_ANY;
> fd = perf_event_open(attr, 0, 1, -1, 0);
>
On 5/13/19 2:26 PM, Peter Zijlstra wrote:
> On Mon, May 13, 2019 at 09:42:13AM +0200, Peter Zijlstra wrote:
>> On Sat, May 11, 2019 at 08:12:16AM +0530, Ravi Bangoria wrote:
>>> Add a check for sample_period value sent from userspace. Negative
>>> value does not make
t;
> Modify the warning message. "--user-regs=?" should be applied to show
> the available registers for --user-regs.
>
> Signed-off-by: Kan Liang
> ---
For patch 1 and 2,
Tested-by: Ravi Bangoria
Minor neat. Should we update document as well? May be something like:
t
Mikey, mpe ...
Any thoughts?
Move feature availability check at the start of the function.
Rearrange comment to it's associated code. Use hw->address and
hw->len in the 512 bytes boundary check(to write if statement
in a single line). Add spacing between code blocks.
Signed-off-by: Ravi Bangoria
---
arch/pow
patch 1-3: Code refactor
patch 4: Speedup disabling breakpoint
patch 5: Fix length calculation for unaligned targets
Ravi Bangoria (5):
Powerpc/hw-breakpoint: Replace stale do_dabr() with do_break()
Powerpc/hw-breakpoint: Refactor hw_breakpoint_arch_parse()
Powerpc/hw-breakpoint: Refactor
Directly setting dawr and dawrx with 0 should be enough to
disable watchpoint. No need to reset individual bits in
variable and then set in hw.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/include/asm/hw_breakpoint.h | 3 ++-
arch/powerpc/kernel/process.c| 12
2 files
do_dabr() was renamed with do_break() long ago. But I still see
some comments mentioning do_dabr(). Replace it.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/kernel/hw_breakpoint.c | 2 +-
arch/powerpc/kernel/ptrace.c| 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a
including next doubleword in the length. Watchpoint
exception handler already ignores extraneous exceptions, so no
changes required for that.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/include/asm/hw_breakpoint.h | 7 ++--
arch/powerpc/kernel/hw_breakpoint.c | 44 +---
Remove unnecessary comments. Code itself is self explanatory.
And, ISA already talks about MRD field. I Don't think we need
to re-describe it.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/kernel/process.c | 17 +
1 file changed, 5 insertions(+), 12 deletions(-)
diff --
201 - 300 of 837 matches
Mail list logo