On 2017/05/18 03:22PM, Michael Ellerman wrote:
> "Naveen N. Rao" writes:
>
> > As pointed out in x86 setjmp_pre_handler(), we need to save and restore
> > the parameter save area since the jprobe hook might overwrite it. Since
> > there is no easy way to ident
On 2017/05/17 10:12AM, Masami Hiramatsu wrote:
> On Mon, 15 May 2017 23:35:03 +0530
> "Naveen N. Rao" wrote:
> > diff --git a/arch/powerpc/include/asm/kprobes.h
> > b/arch/powerpc/include/asm/kprobes.h
> > index a83821f33ea3..b6960ef213ac 100644
> >
On 2017/05/17 10:21AM, Masami Hiramatsu wrote:
> On Mon, 15 May 2017 23:35:04 +0530
> "Naveen N. Rao" wrote:
>
> > Fix a circa 2005 FIXME by implementing a check to ensure that we
> > actually got into the jprobe break handler() due to the trap in
> > jp
On 2017/05/22 12:00AM, Nicholas Piggin wrote:
> I'd like to take over the r14 register for use as a per-cpu kernel
> register similar to the way r13 is used for the paca.
>
> r14 being the last non-volatile register gcc allocates, appears with
> about 0.5% the frequency as r31 in (static) instruct
On 2017/05/31 10:53AM, Nicholas Piggin wrote:
> On Wed, 31 May 2017 00:38:17 +0530
> "Naveen N. Rao" wrote:
>
> > On 2017/05/22 12:00AM, Nicholas Piggin wrote:
> > > I'd like to take over the r14 register for use as a per-cpu kernel
> > > regi
This is v2 of some of the patches from:
https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg11.html
The first two patches should probably go to -stable. The others can go
into v4.12.
Thanks,
Naveen
Naveen N. Rao (4):
powerpc/kprobes: Pause function_graph tracing during jprobes
ot;powerpc64: port of the function graph tracer")
Signed-off-by: Naveen N. Rao
---
v2: No changes since v1.
arch/powerpc/kernel/kprobes.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index e1fb95385a9e..0554d6e6
on. In this case, we simply skip the
livepatch_handler and branch to the new NIP. Otherwise, the
livepatch_handler is invoked.
Fixes: ead514d5fb30a ("powerpc/kprobes: Add support for
KPROBES_ON_FTRACE")
Signed-off-by: Naveen N. Rao
---
v2: Changed to use current_kprobe->addr to d
. Also, use SAVE_10GPRS() to simplify the code.
Fixes: 153086644fd1f ("powerpc/ftrace: Add support for -mprofile-kernel
ftrace ABI")
Signed-off-by: Naveen N. Rao
---
v2: No changes since v1.
arch/powerpc/kernel/trace/ftrace_64_mprofile.S | 20
1 file changed, 12 insert
Disable ftrace when we enter xmon so as not to clobber/pollute the
trace buffer. In addition, we cannot have function_graph enabled while
in xmon since we use setjmp/longjmp which confuses the function call
history maintained by function_graph.
Signed-off-by: Naveen N. Rao
---
v2: Disable ftrace
Hi Balbir,
On 2017/06/06 02:29PM, Balbir Singh wrote:
> arch_arm/disarm_probe use direct assignment for copying
> instructions, replace them with patch_instruction
>
> Signed-off-by: Balbir Singh
> ---
> arch/powerpc/kernel/kprobes.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
On 2017/06/06 02:29PM, Balbir Singh wrote:
> With text moving to read-only migrate optprobes to using
> the patch_instruction infrastructure. Without this optprobes
> will fail and complain.
>
> Signed-off-by: Balbir Singh
> ---
> arch/powerpc/kernel/optprobes.c | 58
> +
On 2017/06/07 03:46PM, Balbir Singh wrote:
> On Wed, 2017-06-07 at 00:42 +0530, Naveen N. Rao wrote:
> > On 2017/06/06 02:29PM, Balbir Singh wrote:
> > > With text moving to read-only migrate optprobes to using
> > > the patch_instruction infrastructure. Without this op
We don't save/restore these across a trap, or with KPROBES_ON_FTRACE.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/optprobes_head.S | 8
1 file changed, 8 deletions(-)
diff --git a/arch/powerpc/kernel/optprobes_head.S
b/arch/powerpc/kernel/optprobes_head.S
index 4937bef
* helpers and define HAVE_KPROBES_REGS_SANITY_TEST.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/include/asm/kprobes.h | 4 +
arch/powerpc/lib/Makefile | 3 +-
arch/powerpc/lib/test_kprobe_regs.S | 62
arch/powerpc/lib/test_kprobes.c | 115
elated code")
Reported-by: Shriya R. Kulkarni
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/exceptions-64s.S | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S
b/arch/powerpc/kernel/exceptions-64s.S
index ae418b85c17c..
Hi Aneesh,
On 2017/06/14 08:38AM, Aneesh Kumar K.V wrote:
> "Naveen N. Rao" writes:
>
> > On P9, trying to use data breakpoints throws the splat shown below (*).
> > This is because the check for a data breakpoint in DSISR is in
> > do_hash_page(). Move this
On 2017/06/14 04:41PM, Michael Ellerman wrote:
> "Aneesh Kumar K.V" writes:
> > On Wednesday 14 June 2017 10:41 AM, Naveen N. Rao wrote:
> >> On 2017/06/14 08:38AM, Aneesh Kumar K.V wrote:
> >>> "Naveen N. Rao" writes:
> >>>>
'probe_bz5274:*' -aR ./bz5274
Reported-by: Gustavo Luiz Duarte
Reported-by: z...@redhat.com
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/uprobes.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/arch/powerpc/kernel/uprobes.c b/arch/powerpc/kernel/uprobes.c
index 003b2
.4
> kernel but I'm able to reproduce it with 4.4 kernel.
Hmm... are you sure it's the same issue? The above commit only went into
v4.7, which means we weren't able to use --call-graph=dwarf till v4.7.
Apart from that:
Acked-by: Naveen N. Rao
- Naveen
>
> arch/powe
On 2017/06/15 09:19PM, Michael Ellerman wrote:
> "Naveen N. Rao" writes:
>
> > diff --git a/arch/powerpc/kernel/trace/ftrace_64_mprofile.S
> > b/arch/powerpc/kernel/trace/ftrace_64_mprofile.S
> > index fa0921410fa4..e6837e85ec28 100644
> > --- a/arch/p
On 2017/06/15 09:46AM, Anton Blanchard wrote:
> From: Anton Blanchard
>
> The mcrf emulation code was looking at the CR fields in the reverse
> order. It also relied on reserved fields being zero which is somewhat
> fragile, so fix that too.
Yikes! Amazing catch!
Acked-by
lation code currently puts the entire CR into the destination GPR.
> Fix it.
>
> Cc: sta...@vger.kernel.org
> Signed-off-by: Anton Blanchard
Acked-by: Naveen N. Rao
> ---
> arch/powerpc/lib/sstep.c | 13 +
> 1 file changed, 13 insertions(+)
>
> diff --g
On 2017/06/16 03:16PM, Michael Ellerman wrote:
> "Naveen N. Rao" writes:
>
> > diff --git a/arch/powerpc/kernel/exceptions-64s.S
> > b/arch/powerpc/kernel/exceptions-64s.S
> > index ae418b85c17c..17ee701b8336 100644
> > --- a/arch/powerpc/kernel/except
On 2017/06/19 03:21PM, Aneesh Kumar K.V wrote:
> "Naveen N. Rao" writes:
>
> > On 2017/06/16 03:16PM, Michael Ellerman wrote:
> >> "Naveen N. Rao" writes:
> >>
> >> > diff --git a/arch/powerpc/kernel/exceptions-64s.S
> >
memory loads and register move operations in handle_page_fault(),
handle_dabr_fault() and label '77'.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/exceptions-64s.S | 38 +---
1 file changed, 18 insertions(+), 20 deletions(-)
diff --git a/ar
ting: Timer and ftrace selftests run with different trace clocks.
>
> CC: Naveen N. Rao
> Signed-off-by: Santosh Sivaraj
Thanks for doing this! Apart from the minor nit below:
Acked-by: Naveen N. Rao
> ---
> arch/powerpc/kernel/Makefile | 2 --
> arch/powerpc/kernel/time.c
a local
symbol.
- Patch 5 additionally blacklists __replay_interrupt.
(*)
https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg117562.html
- Naveen
Naveen N. Rao (6):
powerpc64/elfv1: Validate function pointer address in the function
descriptor
powerpc/64s: Convert
received, rather than the
dereferenced value.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/include/asm/code-patching.h | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/code-patching.h
b/arch/powerpc/include/asm/code-patching.h
index
bol visible. Fix
the same by instead using the local label '1'.
Fixes: Commit b48bbb82e2b835 ("powerpc/64s: Don't unbalance the return branch
predictor in __replay_interrupt()")
Suggested-by: Nicholas Piggin
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/exceptions-
Convert some of the symbols into private symbols and blacklist
system_call_common() and system_call() from kprobes. We can't take a
trap at parts of these functions as either MSR_RI is unset or the kernel
stack pointer is not yet setup.
Reviewed-by: Masami Hiramatsu
Signed-off-by: Naveen N
probing on rfi and mtmsr instructions (checked for in
arch_prepare_kprobe()).
Suggested-by: Michael Ellerman
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/entry_64.S | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/
Blacklist all functions involved while handling a trap. We:
- convert some of the symbols into private symbols,
- remove the duplicate 'restore' symbol, and
- blacklist most functions involved while handling a trap.
Reviewed-by: Masami Hiramatsu
Signed-off-by: Naveen N. Rao
---
ar
We can't take traps with relocation off, so blacklist enter_rtas() and
rtas_return_loc(). However, instead of blacklisting all of enter_rtas(),
introduce a new symbol __enter_rtas from where on we can't take a trap
and blacklist that.
Signed-off-by: Naveen N. Rao
---
arch/powe
for powerpc.
Thanks,
Naveen
Naveen N. Rao (2):
trace/kprobes: Sanitize derived event names
selftests/ftrace: Update multiple kprobes test for powerpc
kernel/trace/trace_kprobe.c | 9 +
tools/testing/selftests/ftrace/test.d/kprobe
vents
trace_kprobe: Failed to allocate trace_probe.(-22)
-sh: write error: Invalid argument
After this patch:
# echo 'p kobject_example:foo_store' > kprobe_events
# cat kprobe_events
p:kprobes/p_kobject_example_foo_store_0 kobject_example:foo_store
Signed-off-by: Navee
names properly in
the presence of ':' and '.', such names are accepted by kprobe_events
and constitutes a good test for those symbols.
Signed-off-by: Naveen N. Rao
---
tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc | 8
1 file changed, 4 insertions(+), 4 d
On 2017/06/22 11:06PM, Nicholas Piggin wrote:
> On Thu, 22 Jun 2017 20:59:49 +1000
> Michael Ellerman wrote:
>
> > Nicholas Piggin writes:
> >
> > > On Thu, 22 Jun 2017 00:08:37 +0530
> > > "Naveen N. Rao" wrote:
> > >
> >
On 2017/06/22 11:08PM, Nicholas Piggin wrote:
> On Thu, 22 Jun 2017 21:07:46 +1000
> Michael Ellerman wrote:
>
> > Nicholas Piggin writes:
> >
> > > On Thu, 22 Jun 2017 00:08:39 +0530
> > > "Naveen N. Rao" wrote:
> > >
> > &
On 2017/06/22 11:14PM, Nicholas Piggin wrote:
> On Thu, 22 Jun 2017 21:14:21 +1000
> Michael Ellerman wrote:
>
> > Nicholas Piggin writes:
> >
> > > On Thu, 22 Jun 2017 00:08:40 +0530
> > > "Naveen N. Rao" wrote:
> > >
> >
On 2017/06/22 01:48PM, Nicholas Piggin wrote:
> On Thu, 22 Jun 2017 00:08:42 +0530
> "Naveen N. Rao" wrote:
>
> > We can't take traps with relocation off, so blacklist enter_rtas() and
> > rtas_return_loc(). However, instead of blacklisting all of ente
On 2017/06/22 06:07PM, Masami Hiramatsu wrote:
> On Thu, 22 Jun 2017 00:20:28 +0530
> "Naveen N. Rao" wrote:
>
> > KPROBES_ON_FTRACE is only available on powerpc64le. Update comment to
> > clarify this.
> >
> > Also, we should use an offset of 8 to
On 2017/06/22 06:29PM, Masami Hiramatsu wrote:
> On Thu, 22 Jun 2017 00:20:27 +0530
> "Naveen N. Rao" wrote:
>
> > When we derive event names, convert some expected symbols (such as ':'
> > used to specify module:name and '.' present in some s
On 2017/04/27 11:21AM, Masami Hiramatsu wrote:
> On Thu, 27 Apr 2017 01:38:10 +0530
> "Naveen N. Rao" wrote:
>
> > Michael Ellerman wrote:
> > > "Naveen N. Rao" writes:
> > >> diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
> >
On 2017/06/24 08:06PM, Masami Hiramatsu wrote:
> On Sat, 24 Jun 2017 02:30:21 +0900
> Masami Hiramatsu wrote:
>
> > On Thu, 22 Jun 2017 22:33:25 +0530
> > "Naveen N. Rao" wrote:
> >
> > > On 2017/06/22 06:07PM, Masami Hiramatsu wrote:
> > &g
On 2017/06/28 11:16PM, Masami Hiramatsu wrote:
> > > diff --git
> > > a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
> > > b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
> > > new file mode 100644
> > > index 000..d259031
> > > --- /dev/null
> > > +++ b
nuxppc-dev@lists.ozlabs.org/msg119596.html
(*) series 2:
https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg117562.html
- Naveen
Naveen N. Rao (7):
powerpc64/elfv1: Only dereference function descriptor for non-text
symbols
powerpc/64s: Convert .L__replay_interrupt_return to a local label
Piggin
Signed-off-by: Naveen N. Rao
---
arch/powerpc/include/asm/code-patching.h | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/code-patching.h
b/arch/powerpc/include/asm/code-patching.h
index abef812de7f8..5482928eea1b 100644
--- a/arch
iggin
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/entry_64.S | 29 +++--
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index da9486e2fd89..ef8e6615b8ba 100644
--- a/arch/powerpc/k
bol visible. Fix
the same by instead using the local label '1'.
Fixes: Commit b48bbb82e2b835 ("powerpc/64s: Don't unbalance the return branch
predictor in __replay_interrupt()")
Suggested-by: Nicholas Piggin
Reviewed-by: Nicholas Piggin
Signed-off-by: Naveen N. Rao
---
have since been made private or removed entirely.
So, let's move system_call() slightly higher up, right after the mtmsr
instruction that enables interrupts. Convert existing references to
system_call to a local syscall symbol.
Suggested-by: Nicholas Piggin
Signed-off-by: Naveen N. Rao
---
Blacklist all functions involved while handling a trap. We:
- convert some of the symbols into private symbols, and
- blacklist most functions involved while handling a trap.
Reviewed-by: Masami Hiramatsu
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/entry_64.S | 35
probing on rfi and mtmsr instructions (checked for in
arch_prepare_kprobe()).
Suggested-by: Michael Ellerman
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/entry_64.S | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/
We can't take traps with relocation off, so blacklist enter_rtas() and
rtas_return_loc(). However, instead of blacklisting all of enter_rtas(),
introduce a new symbol __enter_rtas from where on we can't take a trap
and blacklist that.
Signed-off-by: Naveen N. Rao
---
arch/powe
On 2017/06/29 08:49PM, Nicholas Piggin wrote:
> On Thu, 29 Jun 2017 16:11:04 +0530
> "Naveen N. Rao" wrote:
>
> > Currently, we assume that the function pointer we receive in
> > ppc_function_entry() points to a function descriptor. However, this is
> &g
On 2017/06/29 08:55PM, Nicholas Piggin wrote:
> On Thu, 29 Jun 2017 16:11:08 +0530
> "Naveen N. Rao" wrote:
>
> > It is actually safe to probe system_call() in entry_64.S, but only till
> > we unset MSR_RI. To allow this, add a new symbol system_call_exit()
>
On 2017/06/29 09:01PM, Nicholas Piggin wrote:
> On Thu, 29 Jun 2017 16:11:10 +0530
> "Naveen N. Rao" wrote:
>
> > We can't take traps with relocation off, so blacklist enter_rtas() and
> > rtas_return_loc(). However, instead of blacklisting all of ente
On 2017/06/29 09:57AM, Masami Hiramatsu wrote:
> On Thu, 29 Jun 2017 00:13:24 +0530
> "Naveen N. Rao" wrote:
>
> > On 2017/06/28 11:16PM, Masami Hiramatsu wrote:
> > > > > diff --git
> > > > > a/tools/testing/selftests/ftrace/test.
vents
trace_kprobe: Failed to allocate trace_probe.(-22)
-sh: write error: Invalid argument
After this patch:
# echo 'p kobject_example:foo_store' > kprobe_events
# cat kprobe_events
p:kprobes/p_kobject_example_foo_store_0 kobject_example:foo_store
Acked-by:
Hiramatsu (1):
selftests/ftrace: Add a testcase for kprobe event naming
Naveen N. Rao (3):
trace/kprobes: Sanitize derived event names
selftests/ftrace: Add a test to probe module functions
selftests/ftrace: Update multiple kprobes test for powerpc
kernel/trace/trace_kprobe.c
Add a kprobes test to ensure that we are able to add a probe on a
module function using 'p :' format, without having to
specify a probe name.
Suggested-by: Masami Hiramatsu
Acked-by: Masami Hiramatsu
Signed-off-by: Naveen N. Rao
---
.../testing/selftests/ftrace/test.d/kprobe/probe
or 16
will fall on ftrace location. Offset 8 is currently guaranteed to not be
the ftrace location.
Signed-off-by: Naveen N. Rao
---
tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/f
group name.
Signed-off-by: Masami Hiramatsu
[Updated tests to use vfs_read and symbols with '.isra.',
added check for kprobe_events and a command to clear it on exit]
Signed-off-by: Naveen N. Rao
---
.../ftrace/test.d/kprobe/kprobe_eventname.tc | 32 ++
1 fi
On 2017/06/29 10:13PM, Nicholas Piggin wrote:
> On Thu, 29 Jun 2017 17:24:14 +0530
> "Naveen N. Rao" wrote:
>
> > On 2017/06/29 09:01PM, Nicholas Piggin wrote:
> > > On Thu, 29 Jun 2017 16:11:10 +0530
> > > "Naveen N. Rao" wrote:
> &g
@lists.ozlabs.org/msg117562.html
- Naveen
Naveen N. Rao (7):
powerpc64/elfv1: Only dereference function descriptor for non-text
symbols
powerpc/64s: Convert .L__replay_interrupt_return to a local label
powerpc/64s: Blacklist system_call() and system_call_common() from
kprobes
powerpc
Piggin
Reviewed-by: Nicholas Piggin
Signed-off-by: Naveen N. Rao
---
arch/powerpc/include/asm/code-patching.h | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/code-patching.h
b/arch/powerpc/include/asm/code-patching.h
index abef812de7f8
bol visible. Fix
the same by instead using the local label '1'.
Fixes: Commit b48bbb82e2b835 ("powerpc/64s: Don't unbalance the return branch
predictor in __replay_interrupt()")
Suggested-by: Nicholas Piggin
Reviewed-by: Nicholas Piggin
Signed-off-by: Naveen N. Rao
---
iggin
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/entry_64.S | 29 +++--
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index da9486e2fd89..ef8e6615b8ba 100644
--- a/arch/powerpc/k
d-off-by: Naveen N. Rao
---
arch/powerpc/kernel/entry_64.S | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index ef8e6615b8ba..c39436706555 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/k
It is actually safe to probe system_call() in entry_64.S, but only till
we unset MSR_RI. To allow this, add a new symbol system_call_exit()
after the mtmsrd and blacklist that.
Suggested-by: Michael Ellerman
Reviewed-by: Nicholas Piggin
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel
Blacklist all functions involved while handling a trap. We:
- convert some of the symbols into private symbols, and
- blacklist most functions involved while handling a trap.
Reviewed-by: Masami Hiramatsu
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/entry_64.S | 35
We can't take traps with relocation off, so blacklist enter_rtas() and
rtas_return_loc(). However, instead of blacklisting all of enter_rtas(),
introduce a new symbol __enter_rtas from where on we can't take a trap
and blacklist that.
Signed-off-by: Naveen N. Rao
---
arch/powe
On 2017/07/02 10:40PM, Nicholas Piggin wrote:
> On Sat, 01 Jul 2017 12:24:02 +1000
> Michael Ellerman wrote:
>
> > "Naveen N. Rao" writes:
> >
> > > Convert some of the symbols into private symbols and blacklist
> > > system_call_common(
On 2017/07/03 12:51PM, Masami Hiramatsu wrote:
> On Mon, 3 Jul 2017 12:27:33 +0900
> Masami Hiramatsu wrote:
>
> > On Thu, 29 Jun 2017 19:05:37 +0530
> > "Naveen N. Rao" wrote:
> >
> > > Add a kprobes test to ensure that we are able to add a probe
g task stack and livepatch stack into r1 register.
> Using r11 register also avoids disabling/enabling irq's while setting
> up the livepatch stack.
>
> Signed-off-by: Kamalesh Babulal
> Cc: Balbir Singh
> Cc: Naveen N. Rao
> Cc: linuxppc-dev@lists.ozlabs.org
> ---
> arch/powerpc/kernel/trace/ftrace_64_mprofile.S | 45
> +-
> 1 file changed, 15 insertions(+), 30 deletions(-)
Reviewed-by: Naveen N. Rao
- Naveen
On 2017/09/21 09:00PM, Balbir Singh wrote:
> On Thu, Sep 21, 2017 at 8:02 PM, Michael Ellerman wrote:
> > Kamalesh Babulal writes:
> >
> >> While running stress test with livepatch module loaded, kernel
> >> bug was triggered.
> >>
> >> cpu 0x5: Vector: 400 (Instruction Access) at [c000eb9d3b
detection of jprobe in
ftrace_caller() and that this is only for KPROBES_ON_FTRACE.
- Naveen
Naveen N. Rao (6):
powerpc/kprobes: Some cosmetic updates to try_to_emulate()
powerpc/kprobes: Do not suppress instruction emulation if a single run
failed
powerpc/kprobes: Clean up jprobe
at least once, then we single step only this probe hit and
continue to try emulating the instruction in subsequent probe hits.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/kprobes.c | 17 ++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel
1. This is only used in kprobes.c, so make it static.
2. Remove the un-necessary (ret == 0) comparison in the else clause.
Reviewed-by: Masami Hiramatsu
Reviewed-by: Kamalesh Babulal
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/kprobes.c | 4 ++--
1 file changed, 2 insertions(+), 2
ng the
check done by __this_cpu_read().
Fixes: c05b8c4474c030 ("powerpc/kprobes: Skip livepatch_handler() for jprobes")
Reported-by: Kamalesh Babulal
Tested-by: Kamalesh Babulal
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/kprobes-ftrace.c | 8 ++--
1 file changed, 6 inser
patch
renames is_current_kprobe_addr() to __is_active_jprobe() and adds a
comment to (hopefully) better clarify the purpose of this helper. The
helper has also now been moved to kprobes-ftrace.c so that it is only
available for KPROBES_ON_FTRACE.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/include/
ble it.
Fixes: ead514d5fb30a0 ("powerpc/kprobes: Add support for KPROBES_ON_FTRACE")
Acked-by: Masami Hiramatsu
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/kprobes-ftrace.c | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/kprobes-
Fix a circa 2005 FIXME by implementing a check to ensure that we
actually got into the jprobe break handler() due to the trap in
jprobe_return().
Acked-by: Masami Hiramatsu
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/kprobes.c | 20 +---
1 file changed, 9 insertions
viour of all these instructions needs to
> be updated to set these new bits accordingly.
>
> Signed-off-by: Sandipan Das
For this series:
Acked-by: Naveen N. Rao
> ---
> arch/powerpc/lib/sstep.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/powerpc/lib/
store/restore TOC/LR values, other than
> the stub setup and branch. The additional instructions sequences to handle
> klp_stub increases the stub size and current ppc64_stub_insn[] is not
> sufficient to hold them. This patch also introduces new
> ppc64le_klp_stub_entry[], along with the helpers to f
the base of
> the regular stack and is used to store/restore TOC/LR values, other than
> the stub setup and branch. The additional instructions sequences to
> handle klp_stub increases the stub size and current ppc64_stub_insn[]
> is not sufficient to hold them. This patch also introd
Hi Santosh,
On 2017/09/18 09:23AM, Santosh Sivaraj wrote:
> Reorganize code to make it easy to introduce CLOCK_REALTIME_COARSE and
> CLOCK_MONOTONIC_COARSE timer support.
>
> Signed-off-by: Santosh Sivaraj
> ---
> arch/powerpc/kernel/vdso64/gettimeofday.S | 14 --
> 1 file changed,
On 2017/09/18 09:23AM, Santosh Sivaraj wrote:
> Current vDSO64 implementation does not have support for coarse clocks
> (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), for which it falls back
> to system call, increasing the response time, vDSO implementation reduces
> the cycle time. Below is a b
On 2017/09/18 09:23AM, Santosh Sivaraj wrote:
> Current vDSO64 implementation does not have support for coarse clocks
> (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), for which it falls back
> to system call, increasing the response time, vDSO implementation reduces
> the cycle time. Below is a b
On 2017/10/09 08:09AM, Santosh Sivaraj wrote:
> Current vDSO64 implementation does not have support for coarse clocks
> (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), for which it falls back
> to system call, increasing the response time, vDSO implementation reduces
> the cycle time. Below is a b
On 2017/10/09 11:07AM, Sandipan Das wrote:
> According to the GCC documentation, the behaviour of __builtin_clz()
> and __builtin_clzl() is undefined if the value of the input argument
> is zero. Without handling this special case, these builtins have been
> used for emulating the following instruc
nge analyse_instr so it doesn't modify
> *regs")
> Signed-off-by: Sandipan Das
Reviewed-by: Naveen N. Rao
> ---
> v2: Make zero-checking condition more compact.
> Add details of original commit that is being fixed here.
> ---
> arch/powerpc/lib/sstep.c | 6 --
On 2017/10/10 09:03AM, Santosh Sivaraj wrote:
> * Naveen N. Rao wrote (on 2017-10-09
> 10:39:18 +):
>
> > On 2017/10/09 08:09AM, Santosh Sivaraj wrote:
[snip]
> > > + add r3,r3,r0
> > > + ld r0,CFG_TB_UPDATE_COUNT(r3)
> > > + cmpld c
Hi Santosh,
This seems to have gone from v4 to v6 -- did I miss v5?
On 2017/10/10 11:10PM, Santosh Sivaraj wrote:
> Current vDSO64 implementation does not have support for coarse clocks
> (CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME_COARSE), for which it falls back
> to system call, increasing the resp
t; CLOCK_REALTIME_COARSE (Naveen)
> - Reorder instructions to get proper dependency setup (Naveen)
>
> arch/powerpc/kernel/asm-offsets.c | 2 +
> arch/powerpc/kernel/vdso64/gettimeofday.S | 68
> ++-
> 2 files changed, 59 insertions(+), 11 deletions(-)
Looks good to me.
Reviewed-by: Naveen N. Rao
ed if
CONFIG_PREEMPT was enabled. Commit a30b85df7d599f ("kprobes: Use
synchronize_rcu_tasks() for optprobe with CONFIG_PREEMPT=y") changes
this.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/optprobes.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/kprobes-ftrace.c | 10 ++
arch/powerpc/kernel/optprobes.c | 10 --
2 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/arch/powerpc/kernel/kprobes-ftrace.c
b/arch/powerpc/kernel/kprobes-ftrace.c
ind
Signed-off-by: Naveen N. Rao
---
arch/powerpc/lib/sstep.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index 8c3955e183d4..70274b7b4773 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -2717,6 +2717,7 @@ void emul
Use safer string manipulation functions when dealing with a
user-provided string in kprobe_lookup_name().
Reported-by: David Laight
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/kprobes.c | 47 ++-
1 file changed, 20 insertions(+), 27 deletions
On 2017/10/25 02:18AM, Masami Hiramatsu wrote:
> On Mon, 23 Oct 2017 22:07:38 +0530
> "Naveen N. Rao" wrote:
>
> > Per Documentation/kprobes.txt, probe handlers need to be invoked with
> > preemption disabled. Update optimized_callback() to do so. Also move
>
901 - 1000 of 1372 matches
Mail list logo