Hi Masami,
On 03/14/2018 07:18 PM, Masami Hiramatsu wrote:
> Hi Ravi,
>
> On Tue, 13 Mar 2018 18:26:00 +0530
> Ravi Bangoria wrote:
>
>> Userspace Statically Defined Tracepoints[1] are dtrace style markers
>> inside userspace applications. These markers are added b
On 03/14/2018 07:45 PM, Masami Hiramatsu wrote:
> On Tue, 13 Mar 2018 18:26:01 +0530
> Ravi Bangoria wrote:
>
>> For tiny binaries/libraries, different mmap regions points to the
>> same file portion. In such cases, we may increment reference counter
>> multiple times
On 03/14/2018 07:39 PM, Masami Hiramatsu wrote:
> Hi Ravi,
>
> This code logic looks good. I just have several small comments for style.
>
> On Tue, 13 Mar 2018 18:26:02 +0530
> Ravi Bangoria wrote:
>
>> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/pro
On 03/14/2018 07:20 PM, Masami Hiramatsu wrote:
> On Tue, 13 Mar 2018 18:26:03 +0530
> Ravi Bangoria wrote:
>
>> No functionality changes.
> Please consider to describe what is this change and why, here.
Will add in next version.
>> Signed-off-by: Ravi Bangoria
>&g
Hi Song,
On 09/25/2018 03:55 AM, Song Liu wrote:
> This patch tries to enable PMU sharing. To make perf event scheduling
> fast, we use special data structures.
>
> An array of "struct perf_event_dup" is added to the perf_event_context,
> to remember all the duplicated events under this ctx. All
Hi Thomas,
On 09/28/2018 01:13 PM, Thomas Richter wrote:
> diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
> index 54ca7d87236f..e83c15a95c43 100644
> --- a/tools/perf/tests/builtin-test.c
> +++ b/tools/perf/tests/builtin-test.c
> @@ -124,7 +124,7 @@ static struct te
Hi Thomas,
On 09/28/2018 03:32 PM, Thomas-Mich Richter wrote:
> I can rework the patch to use the is_supported() member function. The
> down side is that the test does not show up in the list of executed tests
> anymore,
> unless some debug output is enabled:
Which should be fine because s390 is
ort to avoid these tests being executed on
> s390 platform:
>
> [root@s8360046 perf]# ./perf test 22
> [root@s8360046 perf]# ./perf test -v 22
> 22: Watchpoint: Disabled
> [root@s8360046 perf]#
>
> Signed-off-by: Thomas Richter
Acked-by: Ravi Bangoria
Thanks,
Ravi
On 11/16/18 7:05 PM, Jiri Olsa wrote:
> On Fri, Nov 16, 2018 at 09:58:43AM +0530, Ravi Bangoria wrote:
>> Commit 0aa802a79469 ("perf stat: Get rid of extra clock display
>> function") introduced scale and unit for clock events. Thus,
>> perf_stat__update_shadow_
Hi Oleg,
On 11/14/18 9:36 PM, Oleg Nesterov wrote:
> On 11/14, Ravi Bangoria wrote:
>>
>> syzbot reported a kernel crash with delayed_uprobe_remove():
>> https://lkml.org/lkml/2018/11/1/1244
>>
>> Backtrace mentioned in the link points to a race between proc
We already have function to check if a given event is either
SW_CPU_CLOCK or SW_TASK_CLOCK. Utilize it.
Signed-off-by: Ravi Bangoria
---
tools/perf/util/stat-shadow.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat
is results in a sightly different
values of shadow stats.
Reported-by: Anton Blanchard
Fixes: 0aa802a79469 ("perf stat: Get rid of extra clock display function")
Signed-off-by: Ravi Bangoria
---
tools/perf/util/stat-shadow.c | 13 +++--
tools/perf/util/stat.h| 2 +-
2 fi
a802a79469 ("perf stat: Get rid of extra clock display function")
Signed-off-by: Ravi Bangoria
---
tools/perf/util/stat-shadow.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
index f0a8cec55c47..3c22c58b3e9
().
Reported-by: syzbot+cb1fb754b771caca0...@syzkaller.appspotmail.com
Signed-off-by: Ravi Bangoria
---
kernel/events/uprobes.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 96fb51f3994f..e527c4753d4f 100644
--- a/kernel/events/uprobes.c
+++ b
...@syzkaller.appspotmail.com
Fixes: 1cc33161a83d ("uprobes: Support SDT markers having reference count
(semaphore)")
Signed-off-by: Ravi Bangoria
---
kernel/events/uprobes.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 32
Hi Steve,
Please pull this patch.
Thanks.
On 11/15/18 6:13 PM, Oleg Nesterov wrote:
> On 11/15, Ravi Bangoria wrote:
>>
>> There could be a race between task exit and probe unregister:
>>
>> exit_mm()
>> mmput()
>> __mmput() upro
Hi Srikar,
On 07/02/2018 08:24 PM, Srikar Dronamraju wrote:
> * Ravi Bangoria [2018-06-28 10:52:08]:
>
>> Reference counter gate the invocation of probe. If present,
>> by default reference count is 0. Kernel needs to increment
>> it before tracing the probe and decr
Hi Tvrtko,
> @@ -199,7 +199,7 @@ static inline void perf_get_data_addr(struct pt_regs
> *regs, u64 *addrp)
> if (!(mmcra & MMCRA_SAMPLE_ENABLE) || sdar_valid)
> *addrp = mfspr(SPRN_SDAR);
>
> - if (perf_paranoid_kernel() && !capable(CAP_SYS_ADMIN) &&
> + if (perf_par
Hi Oleg,
On 07/10/2018 08:55 PM, Oleg Nesterov wrote:
> Hi Ravi,
>
> On 07/04, Ravi Bangoria wrote:
>>
>>> Now I understand what did you mean by "for each consumer". So if we move
>>> this logic
>>> into install/remove_breakpoint as I tr
Hello Darrick,
Lockdep is reporting a deadlock with following trace. Saw this on my
powerpc vm with 4GB of ram, running Linus/master kernel. Though, I
don't have exact testcase to reproduce it. Is this something known?
[ 1797.620389] ==
[ 1797.
Thanks Oleg for the review,
On 05/24/2018 09:56 PM, Oleg Nesterov wrote:
> On 04/17, Ravi Bangoria wrote:
>>
>> @@ -941,6 +1091,9 @@ typedef bool (*filter_func_t)(struct uprobe_consumer
>> *self,
>> if (ret)
>> goto err_buffer;
&g
Hi Thomas,
On 05/24/2018 07:26 PM, Thomas Richter wrote:
> @@ -95,7 +98,7 @@ int test__session_topology(struct test *test
> __maybe_unused, int subtest __maybe
> {
> char path[PATH_MAX];
> struct cpu_map *map;
> - int ret = -1;
> + int ret;
This is failing for me:
tests/top
Few fields are missing in a perf script -F hint. Add them.
Signed-off-by: Ravi Bangoria
---
tools/perf/builtin-script.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index b3bf35512d21..4d1cee68cfd2 100644
First patch fixes perf output field hint. Second and third fixes
crash when used in a piped mode.
Ravi Bangoria (3):
perf script: Add missing output fields in a hint
perf script: Fix crash because of missing evsel->priv
perf script: Fix crash because of missing feat_op[] entry
tools/p
Arnaldo,
We already have a binary offset handy in perf code but there is no way to
dump it with perf script. We can derive it from symname+symoff but that's
a manual work.
Will it be good to have a '-F binoff' option?
Ravi
On 05/18/2018 01:29 AM, Arnaldo Carvalho de Melo wrote:
> Em Thu, May 1
entation
[2] https://github.com/iovisor/bcc/issues/327#issuecomment-200576506
Ravi Bangoria (4):
Uprobes: Support SDT markers having reference count (semaphore)
Uprobes/sdt: Prevent multiple reference counter for same uprobe
trace_uprobe/sdt: Prevent multiple reference counter for same uprobe
We assume to have only one reference counter for one uprobe.
Don't allow user to register multiple uprobes having same
inode+offset but different reference counter.
Signed-off-by: Ravi Bangoria
Acked-by: Srikar Dronamraju
Reviewed-by: Oleg Nesterov
---
kernel/events/uprobes.c
ion. So we are calling it a 'reference counter'
in kernel / perf code.
Signed-off-by: Ravi Bangoria
Reviewed-by: Masami Hiramatsu
[Only trace_uprobe.c]
Reviewed-by: Oleg Nesterov
---
include/linux/uprobes.h | 5 +
kernel/events/uprobes.c | 259 +++
/tick
# ./perf probe sdt_tick:loop2
# ./perf stat -e sdt_tick:loop2 /tmp/tick
hi: 0
hi: 1
hi: 2
^C
Performance counter stats for '/tmp/tick':
3 sdt_tick:loop2
2.561851452 seconds time elapsed
Signed-off-by: Ravi Bangoria
Acked-by: Masami
y does not conflict with
any other existing entries.
Signed-off-by: Ravi Bangoria
Acked-by: Srikar Dronamraju
Reviewed-by: Song Liu
Reviewed-by: Oleg Nesterov
---
kernel/trace/trace_uprobe.c | 37 +++--
1 file changed, 35 insertions(+), 2 deletions(-)
diff --g
> http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> Branch: master
> Target: jetson-tk1
> Lab:lab-baylibre
> Config: multi_v7_defconfig
> Plan: boot
>
> Breaking commit found:
>
> --
Hi Song,
On 07/14/2018 05:20 AM, Song Liu wrote:
>
> Hmm... what happens when we have multiple uprobes sharing the same
> reference counter? It feels equally complicate to me. Or did I miss any
> cases here?
As far as I can think of, it should be handled by default. No special
treatment needed
Add addition argument 'arch_uprobe' to uprobe_write_opcode().
We need this in later set of patches.
Signed-off-by: Ravi Bangoria
---
arch/arm/probes/uprobes/core.c | 2 +-
arch/mips/kernel/uprobes.c | 2 +-
include/linux/uprobes.h| 2 +-
kernel/events/uprobes.c
Simplify uprobe_register() function body and let __uprobe_register()
handle everything. Also move dependency functions around to fix build
failures.
Signed-off-by: Ravi Bangoria
---
kernel/events/uprobes.c | 69 ++---
1 file changed, 36 insertions
m_flags has VM_SHARED set.
- No need to use FOLL_FORCE in get_user_pages_remote() while getting
a page to update reference counter. Remove it.
- Do not mention usage of reference counter in Documentation/.
v5 can be found at: https://lkml.org/lkml/2018/6/28/51
Ravi Bangoria (6):
Uprobes: Simplify
hronization. So we are referring it as 'reference
counter' in kernel / perf code.
Signed-off-by: Ravi Bangoria
---
include/linux/uprobes.h | 5 +
kernel/events/uprobes.c | 232 ++--
kernel/trace/trace.c| 2 +-
kernel/trace/tra
e new entry does not conflict with
any other existing entry.
2) Any one of the reference counter offset is 0 while comparing
new entry with old one.
Signed-off-by: Ravi Bangoria
---
kernel/trace/trace_uprobe.c | 40 ++--
1 file changed, 38 insertions(+), 2
ntain reference counter on his own.
Signed-off-by: Ravi Bangoria
---
kernel/events/uprobes.c | 52 +++--
1 file changed, 50 insertions(+), 2 deletions(-)
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 84da8512a974..563cc3e625b3 1
/tick
# ./perf probe sdt_tick:loop2
# ./perf stat -e sdt_tick:loop2 /tmp/tick
hi: 0
hi: 1
hi: 2
^C
Performance counter stats for '/tmp/tick':
3 sdt_tick:loop2
2.561851452 seconds time elapsed
Signed-off-by: Ravi Bangoria
Acked-by: Masami
Can
we introduce one more config there? config3?
[1] https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation
[2] https://github.com/iovisor/bcc/issues/327#issuecomment-200576506
[3] https://lkml.org/lkml/2017/12/6/976
Ravi Bangoria (4):
Uprobe: Rename map_info to uprobe_map_info
These functions and data structures will be used by other files
in later patches.
Signed-off-by: Ravi Bangoria
---
include/linux/uprobes.h | 23 +++
kernel/events/uprobes.c | 20 ++--
2 files changed, 29 insertions(+), 14 deletions(-)
diff --git a/include
map_info is very generic name, rename it to uprobe_map_info.
Renaming will help to export this structure outside of the
file.
Signed-off-by: Ravi Bangoria
---
kernel/events/uprobes.c | 32 +---
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/kernel
ent the semaphore if corresponding uprobe is enabled.
At the time of disabling probes, decrement semaphore in all existing
target processes.
Signed-off-by: Ravi Bangoria
---
include/linux/uprobes.h | 2 +
kernel/events/uprobes.c | 5 ++
kernel/trace/trace_uprobe.c |
0 > events/sdt_tick/loop2/enable
# dd if=/proc//mem bs=1 count=1 skip=268566582 2>/dev/null | xxd
000: 00 .
Signed-off-by: Ravi Bangoria
---
kernel/trace/trace_uprobe.c | 105 ++--
1 file changed, 102 in
On 02/28/2018 05:36 PM, Srikar Dronamraju wrote:
> * Ravi Bangoria [2018-02-28 13:23:41]:
>
>> # readelf -n ./tick
>> Provider: tick
>> Name: loop2
>> ... Semaphore: 0x10020036
>>
>> # readelf -SW ./tick | grep p
On 02/28/2018 05:39 PM, Srikar Dronamraju wrote:
>> -static inline struct map_info *free_map_info(struct map_info *info)
>> +static inline struct uprobe_map_info *
>> +free_uprobe_map_info(struct uprobe_map_info *info)
>> {
>> -struct map_info *next = info->next;
>> +struct uprobe_map_in
On 02/28/2018 05:54 PM, Srikar Dronamraju wrote:
>> @@ -149,6 +155,11 @@ struct uprobes_state {
>> extern bool arch_uprobe_ignore(struct arch_uprobe *aup, struct pt_regs
>> *regs);
>> extern void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,
>>
On 02/28/2018 07:55 PM, Masami Hiramatsu wrote:
> Hi Ravi,
>
> Thank you for your great work!
Thanks Masami.
> On Wed, 28 Feb 2018 13:23:41 +0530
> Ravi Bangoria wrote:
>
>> Userspace Statically Defined Tracepoints[1] are dtrace style markers
>> inside userspa
a marker. This is not really
used for any synchronization. So we are referring it as 'reference
counter' in kernel / perf code.
Signed-off-by: Ravi Bangoria
Signed-off-by: Fengguang Wu
[Fengguang reported/fixed build failure in RFC patch]
---
include/linux/uprobes.h | 10 +++
kern
map_info is very generic name, rename it to uprobe_map_info.
Renaming will help to export this structure outside of the
file.
Also rename free_map_info() to uprobe_free_map_info() and
build_map_info() to uprobe_build_map_info().
Signed-off-by: Ravi Bangoria
Reviewed-by: Jérôme Glisse
From: Oleg Nesterov
build_map_info() has a side effect like one need to perform
mmput() when done with the mm. Add mmput() in free_map_info()
so that user does not have to call it explicitly.
Signed-off-by: Oleg Nesterov
Signed-off-by: Ravi Bangoria
---
kernel/events/uprobes.c | 9
rence counter.
- Other changes as suggested by Masami, Oleg and Steve.
v1 can be found at:
https://lkml.org/lkml/2018/3/13/432
[1] https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation
[2] https://github.com/iovisor/bcc/issues/327#issuecomment-200576506
[3] https://lkml.org/lkml/2017/12
.
Signed-off-by: Ravi Bangoria
---
Documentation/trace/uprobetracer.txt | 16 +---
kernel/trace/trace.c | 2 +-
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/Documentation/trace/uprobetracer.txt
b/Documentation/trace/uprobetracer.txt
index bf526a7c
count=1 skip=$(( 0x7fff9cbb99d8 ))
2>/dev/null | xxd
000: 00 .
Signed-off-by: Ravi Bangoria
---
kernel/trace/trace_uprobe.c | 105 ++--
1 file changed, 102 insertions(+), 3 deletions(-)
diff --git a/kernel/
These are generic functions which operates on file offset
and virtual address. Make these functions available outside
of uprobe code so that other can use it as well.
Signed-off-by: Ravi Bangoria
Reviewed-by: Jérôme Glisse
---
include/linux/mm.h | 12
kernel/events/uprobes.c
/tick
# ./perf probe sdt_tick:loop2
# ./perf stat -e sdt_tick:loop2 /tmp/tick
hi: 0
hi: 1
hi: 2
^C
Performance counter stats for '/tmp/tick':
3 sdt_tick:loop2
2.561851452 seconds time elapsed
Signed-off-by: Ravi Bangoria
---
tools/perf/
Make function names more meaningful by adding vma_ prefix
to them.
Signed-off-by: Ravi Bangoria
Reviewed-by: Jérôme Glisse
---
include/linux/mm.h | 4 ++--
kernel/events/uprobes.c | 14 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/linux/mm.h b
Given the file(inode) and offset, build_map_info() finds all
existing mm that map the portion of file containing offset.
Exporting these functions and data structure will help to use
them in other set of files.
Signed-off-by: Ravi Bangoria
Reviewed-by: Jérôme Glisse
---
include/linux
On 04/17/2018 10:02 AM, Ravi Bangoria wrote:
> Userspace Statically Defined Tracepoints[1] are dtrace style markers
> inside userspace applications. Applications like PostgreSQL, MySQL,
> Pthread, Perl, Python, Java, Ruby, Node.js, libvirt, QEMU, glib etc
> have these markers embe
Hi Masami,
On 04/23/2018 12:32 PM, Masami Hiramatsu wrote:
> On Tue, 17 Apr 2018 09:43:46 +0530
> Ravi Bangoria wrote:
>
>> +pr_debug("Purged all: %s\n", err ? "FAIL" : "Ok");
> Hmm, I think this should use pr_info(or pr_warning), at least fo
2600
H_SEND_CRQ 77 1762 7240 2447
Signed-off-by: Ravi Bangoria
---
.../perf/scripts/python/bin/powerpc-hcalls-record | 2 +
.../perf/scripts/python/bin/powerpc-hcalls-report | 2 +
tools/perf/scripts/python/powerpc-hcalls.py
ples from his interested
process. But still this is more of a correctness issue. I'm working on
a fix for this.
[1] https://lkml.org/lkml/2018/4/17/23
[2] https://lkml.org/lkml/2018/5/25/111
[3] https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation
[4] https://gith
Hi Paul,
On 06/06/2018 08:23 PM, Paul Clarke wrote:
> On 06/05/2018 12:50 PM, Arnaldo Carvalho de Melo wrote:
>> From: Ravi Bangoria
>>
>> Add python script to show hypervisor call statistics. Ex,
>>
>> # perf record -a -e "{powerpc:hcall_entry,powe
: stvx : PASS
emulate_step_test: lxvd2x : FAIL
emulate_step_test: stxvd2x: FAIL
Fixes: https://github.com/linuxppc/linux/issues/148
Reported-by: Michael Ellerman
Signed-off-by: Ravi Bangoria
---
Note: VSX was first introduced on P6. But there are many VSX
perf c2c report fails if system has empty numa node(0 cpus):
$ lscpu
NUMA node0 CPU(s):
NUMA node1 CPU(s): 0-4
$ sudo ./perf c2c report
node/cpu topology bugFailed setup nodes
Fix this.
Reported-by: Nageswara R Sastry
Signed-off-by: Ravi Bangoria
---
tools/perf/util/cpumap.c
On 2/28/19 9:52 PM, Jiri Olsa wrote:
> how about attached change (untested)?
LGTM. Would you mind sending a patch.
>
> but I wonder there are some other hidden
> bugs wrt empty node
>
> jirka
>
>
> ---
> diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
> index 4272763a5e96..
On 3/1/19 3:56 PM, Jiri Olsa wrote:
> Ravi Bangoria reported that we fail with empty
> numa node with following message:
>
> $ lscpu
> NUMA node0 CPU(s):
> NUMA node1 CPU(s): 0-4
>
> $ sudo ./perf c2c report
> node/cpu topology bugFailed setup nodes
&g
On 1/14/19 9:44 AM, Ravi Bangoria wrote:
> Powerpc hw does not have inbuilt latency filter (--ldlat) for mem-load
> event and, perf_mem_events by default includes ldlat=30 which is
> causing failure on powerpc. Refactor code to support perf mem/c2c on
> powerpc.
>
> Thi
On 2/8/19 2:03 PM, Ravi Bangoria wrote:
>
>
> On 2/6/19 7:06 PM, Oleg Nesterov wrote:
>> Ravi, I am on vacation till the end of this week, can't read your patch
>> carefully.
>>
>> I am not sure I fully understand the problem, but shouldn't w
On 2/7/19 3:09 PM, Mamatha Inamdar wrote:
> This patch is to remove following hardware events
> from JSON file which are not supported on POWER8
>
Acked-by: Ravi Bangoria
path. But because Uprobe is invalid, entire mmap() operation can
not be stopped. In this case just print an error and continue.
Signed-off-by: Ravi Bangoria
---
v1: http://lore.kernel.org/r/20210119091234.76317-1-ravi.bango...@linux.ibm.com
v1->v2:
- Instead of introducing new arch hook from
On 2/4/21 4:17 PM, Ravi Bangoria wrote:
Don't allow Uprobe on 2nd word of a prefixed instruction. As per
ISA 3.1, prefixed instruction should not cross 64-byte boundary.
So don't allow Uprobe on such prefixed instruction as well.
There are two ways probed instruction is changed
On 12/8/20 8:13 PM, Thomas Richter wrote:
On 12/7/20 5:35 PM, Arnaldo Carvalho de Melo wrote:
Em Tue, Nov 24, 2020 at 03:04:53PM +0530, Ravi Bangoria escreveu:
On 11/19/20 7:20 PM, Kajol Jain wrote:
Commit ed21d6d7c48e6e ("perf tests: Add test for PE binary format support&quo
and continue.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/kernel/uprobes.c | 28
include/linux/uprobes.h | 1 +
kernel/events/uprobes.c | 8
3 files changed, 37 insertions(+)
diff --git a/arch/powerpc/kernel/uprobes.c b/arch/powerpc/kernel
On 3/4/21 1:02 PM, Christophe Leroy wrote:
Le 04/03/2021 à 06:05, Ravi Bangoria a écrit :
As per ISA 3.1, prefixed instruction should not cross 64-byte
boundary. So don't allow Uprobe on such prefixed instruction.
There are two ways probed instruction is changed in mapped pages.
On 3/4/21 4:21 PM, Christophe Leroy wrote:
Le 04/03/2021 à 11:13, Ravi Bangoria a écrit :
On 3/4/21 1:02 PM, Christophe Leroy wrote:
Le 04/03/2021 à 06:05, Ravi Bangoria a écrit :
As per ISA 3.1, prefixed instruction should not cross 64-byte
boundary. So don't allow Uprobe on
d. In this case just print an error and continue.
Signed-off-by: Ravi Bangoria
Acked-by: Naveen N. Rao
---
v3: https://lore.kernel.org/r/20210304050529.59391-1-ravi.bango...@linux.ibm.com
v3->v4:
- CONFIG_PPC64 check was not required, remove it.
- Use SZ_ macros instead of hardcoded numbers
d. In this case just print an error and continue.
Signed-off-by: Ravi Bangoria
---
v2:
https://lore.kernel.org/r/20210204104703.273429-1-ravi.bango...@linux.ibm.com
v2->v3:
- Drop restriction for Uprobe on suffix of prefixed instruction.
It needs lot of code change including generic code
stdio
# Samples: 8K of event 'cycles'
# Event count (approx.): 8784
...
Reported-by: Athira Rajeev
Fixes: aa6b3c99236b ("perf report: Make -F more strict like -s")
Signed-off-by: Ravi Bangoria
---
tools/perf/util/sort.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletio
@@ -41,6 +41,14 @@ int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe,
if (addr & 0x03)
return -EINVAL;
+ if (!IS_ENABLED(CONFIG_PPC64) || !cpu_has_feature(CPU_FTR_ARCH_31))
+ return 0;
Sorry, I missed this last time, but I think we can drop the
On 12/9/20 11:19 PM, Arnaldo Carvalho de Melo wrote:
Em Tue, Dec 08, 2020 at 10:32:33PM +0530, Ravi Bangoria escreveu:
On 12/8/20 8:13 PM, Thomas Richter wrote:
On 12/7/20 5:35 PM, Arnaldo Carvalho de Melo wrote:
Em Tue, Nov 24, 2020 at 03:04:53PM +0530, Ravi Bangoria escreveu:
On 11/19
s test.
Result in power9 platform before this patach:
[command]# ./perf test -F 68
68: PE file support : Failed!
Result in power9 platform after this patch:
[command]# ./perf test -F 68
68: PE file support : Skip
Signed-off-by: Kajol
t the
new member to be added only at the end. i.e. we can allow
nested guest even when L0 hv_guest_state.version > L1
hv_guest_state.version. Though, the other way around is not
possible.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/include/asm/hvcall.h | 17 +++--
arch/pow
#x27;t rename KVM_REG_PPC_DAWR, it's an uapi macro
- patch #3: Increment HV_GUEST_STATE_VERSION
- Split kvm and selftests patches into different series
- Patches rebased to paulus/kvm-ppc-next (cf59eb13e151) + few
other watchpoint patches which are yet to be merged in
paulus/kvm-ppc-next.
Power10 is introducing second DAWR. Use real register names (with
suffix 0) from ISA for current macros and variables used by kvm.
One exception is KVM_REG_PPC_DAWR. Keep it as it is because it's
uapi so changing it will break userspace.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/includ
kvm code assumes single DAWR everywhere. Add code to support 2nd DAWR.
DAWR is a hypervisor resource and thus H_SET_MODE hcall is used to set/
unset it. Introduce new case H_SET_MODE_RESOURCE_SET_DAWR1 for 2nd DAWR.
Also, kvm will support 2nd DAWR only if CPU_FTR_DAWR1 is set.
Signed-off-by: Ravi
Introduce KVM_CAP_PPC_DAWR1 which can be used by Qemu to query whether
kvm supports 2nd DAWR or not.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/kvm/powerpc.c | 3 +++
include/uapi/linux/kvm.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc
On 1/19/21 10:56 PM, Oleg Nesterov wrote:
On 01/19, Ravi Bangoria wrote:
Probe on 2nd word of a prefixed instruction is invalid scenario and
should be restricted.
I don't understand this ppc-specific problem, but...
So far (upto Power9), instruction size was fixed - 4 bytes. But Po
d. In this case just print an error and continue.
Signed-off-by: Ravi Bangoria
Acked-by: Naveen N. Rao
Acked-by: Sandipan Das
---
v4:
https://lore.kernel.org/r/20210305115433.140769-1-ravi.bango...@linux.ibm.com
v4->v5:
- Replace SZ_ macros with numbers
arch/powerpc/kernel/uprob
On 3/9/21 4:51 PM, Naveen N. Rao wrote:
On 2021/03/09 08:54PM, Michael Ellerman wrote:
Ravi Bangoria writes:
As per ISA 3.1, prefixed instruction should not cross 64-byte
boundary. So don't allow Uprobe on such prefixed instruction.
There are two ways probed instruction is chang
On 2/6/21 11:36 PM, Oleg Nesterov wrote:
On 02/04, Ravi Bangoria wrote:
+static int get_instr(struct mm_struct *mm, unsigned long addr, u32 *instr)
+{
+ struct page *page;
+ struct vm_area_struct *vma;
+ void *kaddr;
+ unsigned int gup_flags = FOLL_FORCE
On 2/4/21 6:45 PM, Naveen N. Rao wrote:
On 2021/02/04 04:19PM, Ravi Bangoria wrote:
On 2/4/21 4:17 PM, Ravi Bangoria wrote:
Don't allow Uprobe on 2nd word of a prefixed instruction. As per
ISA 3.1, prefixed instruction should not cross 64-byte boundary.
So don't allow Upro
On 2/4/21 9:42 PM, Naveen N. Rao wrote:
On 2021/02/04 06:38PM, Naveen N. Rao wrote:
On 2021/02/04 04:17PM, Ravi Bangoria wrote:
Don't allow Uprobe on 2nd word of a prefixed instruction. As per
ISA 3.1, prefixed instruction should not cross 64-byte boundary.
So don't allow Upro
On 2/4/21 6:38 PM, Naveen N. Rao wrote:
On 2021/02/04 04:17PM, Ravi Bangoria wrote:
Don't allow Uprobe on 2nd word of a prefixed instruction. As per
ISA 3.1, prefixed instruction should not cross 64-byte boundary.
So don't allow Uprobe on such prefixed instruction as well.
The
Power10 is introducing second DAWR. Use real register names (with
suffix 0) from ISA for current macros and variables used by kvm.
One exception is KVM_REG_PPC_DAWR. Keep it as it is because it's
uapi so changing it will break userspace.
Signed-off-by: Ravi Bangoria
---
arch/powerpc/includ
kvm code assumes single DAWR everywhere. Add code to support 2nd DAWR.
DAWR is a hypervisor resource and thus H_SET_MODE hcall is used to set/
unset it. Introduce new case H_SET_MODE_RESOURCE_SET_DAWR1 for 2nd DAWR.
Also, kvm will support 2nd DAWR only if CPU_FTR_DAWR1 is set.
Signed-off-by: Ravi
Introduce KVM_CAP_PPC_DAWR1 which can be used by Qemu to query whether
kvm supports 2nd DAWR or not. The capability is by default disabled
even when the underlying CPU supports 2nd DAWR. Qemu needs to check
and enable it manually to use the feature.
Signed-off-by: Ravi Bangoria
ch #2: Don't rename KVM_REG_PPC_DAWR, it's an uapi macro
- patch #3: Increment HV_GUEST_STATE_VERSION
- Split kvm and selftests patches into different series
- Patches rebased to paulus/kvm-ppc-next (cf59eb13e151) + few
other watchpoint patches which are yet to be merged in
paulus/kvm-ppc-ne
t the
new member to be added only at the end. i.e. we can allow
nested guest even when L0 hv_guest_state.version > L1
hv_guest_state.version. Though, the other way around is not
possible.
Signed-off-by: Ravi Bangoria
Reviewed-by: Fabiano Rosas
---
arch/powerpc/include/asm/hvcall.
Hi Arnaldo,
Thanks for the review. Please find my comments below.
On Thursday 28 April 2016 03:17 AM, Arnaldo Carvalho de Melo wrote:
Em Wed, Apr 27, 2016 at 06:02:21PM +0530, Ravi Bangoria escreveu:
Hi Arnaldo,
I've worked on your patch. I'm sending this patch(diff) to check if t
101 - 200 of 837 matches
Mail list logo