LOBAL(ftrace_regs_caller)
beq ftrace_no_trace
#endif
The ability to disable ftrace in certain code paths through
paca_struct->ftrace_enabled will also be relevant on ppc32 - it will be
nice if it can be introduced there.
For this series though:
Reviewed-by: Naveen N. Rao
- Naveen
Christophe Leroy wrote:
Le 03/03/2022 à 17:59, Naveen N. Rao a écrit :
Christophe Leroy wrote:
The ability to disable ftrace in certain code paths through
paca_struct->ftrace_enabled will also be relevant on ppc32 - it will be
nice if it can be introduced there.
Ah ? I understood f
Peter Zijlstra wrote:
On Fri, Mar 18, 2022 at 04:21:40PM +0530, Sathvika Vasireddy wrote:
This patch adds powerpc specific functions required for
'objtool mcount' to work, and enables mcount for ppc.
I would love to see more objtool enablement for Power :-)
diff --git a/tools/objtool/arch/p
Christophe Leroy wrote:
Le 18/03/2022 à 11:51, Sathvika Vasireddy a écrit :
This patch adds 'mcount' as a subcommand to objtool, and enables
the same for x86. objtool is built if CONFIG_FTRACE_MCOUNT_USE_OBJTOOL
is selected. Additionally, architectures can select HAVE_NOP_MCOUNT
if they choose
Christophe Leroy wrote:
Le 21/03/2022 à 09:19, Naveen N. Rao a écrit :
Christophe Leroy wrote:
We don't enable ftrace for vdso, so I suspect objtool run above will be
a no-op. This needs to be confirmed, of course.
I just checked without the series: recordmcount isn't run fo
t allow probing interrupt vectors.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/include/asm/probes.h | 55 +++
arch/powerpc/kernel/kprobes.c | 4 +--
arch/powerpc/kernel/uprobes.c | 5 +++
arch/powerpc/xmon/xmon.c | 11 +++
4 files changed, 67 i
rpc64.
- Naveen
Naveen N. Rao (1):
powerpc: Reject probes on instructions that can't be single stepped
Nicholas Piggin (1):
powerpc/64: remove system call instruction emulation
arch/powerpc/include/asm/probes.h | 55 ++
arch/powerpc/kernel/interrupt
omplication, but
it is a big complexity for unclear real benefit.
This patch removes system call emulation and disables stepping system
calls (because they don't work with trace interrupts, as commented).
Signed-off-by: Nicholas Piggin
[also get rid of '#ifdef CONFIG_PPC64']
Si
Stop using the ftrace trampoline for init section once kernel init is
complete.
Fixes: 67361cf8071286 ("powerpc/ftrace: Handle large kernel configs")
Cc: sta...@vger.kernel.org # v4.20+
Signed-off-by: Naveen N. Rao
---
arch/powerpc/include/asm/ftrace.h | 2 ++
arch/powerpc/ke
Michael Ellerman wrote:
Murilo Opsfelder Araújo writes:
On 3/23/22 08:51, Naveen N. Rao wrote:
+static inline bool can_single_step(u32 inst)
+{
+ switch (inst >> 26) {
Can't ppc_inst_primary_opcode() be used instead?
I didn't want to add a dependency on inst.h. B
Christophe Leroy wrote:
Le 28/03/2022 à 19:20, Naveen N. Rao a écrit :
Michael Ellerman wrote:
Murilo Opsfelder Araújo writes:
On 3/23/22 08:51, Naveen N. Rao wrote:
+static inline bool can_single_step(u32 inst)
+{
+ switch (inst >> 26) {
Can't ppc_inst_primary_opcod
Since v1, the main change is to use helpers to decode primary/extended
opcode and the addition of macros for some of the used opcodes.
- Naveen
Naveen N. Rao (2):
powerpc: Sort and de-dup primary opcodes in ppc-opcode.h
powerpc: Reject probes on instructions that can't be single st
Some of the primary opcodes are duplicated. Remove those, and sort the
rest of the primary opcodes to make it easy to read.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/include/asm/ppc-opcode.h | 69 ---
1 file changed, 31 insertions(+), 38 deletions(-)
diff --git a
t allow probing interrupt vectors.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/include/asm/ppc-opcode.h | 18 ++
arch/powerpc/include/asm/probes.h | 36 +++
arch/powerpc/kernel/kprobes.c | 4 +--
arch/powerpc/kernel/uprobes.c | 5
ar
calls.
Signed-off-by: Nicholas Piggin
[minor commit log edit, and also get rid of '#ifdef CONFIG_PPC64']
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/interrupt_64.S | 10 ---
arch/powerpc/lib/sstep.c | 46 +++---
2 files changed, 10 insertions(+
Christophe Leroy wrote:
Le 29/03/2022 à 14:01, Michael Ellerman a écrit :
Josh Poimboeuf writes:
On Sun, Mar 27, 2022 at 09:09:20AM +, Christophe Leroy wrote:
What are current works in progress on objtool ? Should I wait Josh's
changes before starting looking at all this ? Should I wait
Christophe Leroy wrote:
Inlining ftrace_modify_code(), it increases a bit the
size of ftrace code but brings 5% improvment on ftrace
activation.
Signed-off-by: Christophe Leroy
---
arch/powerpc/kernel/trace/ftrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/power
Christophe Leroy wrote:
Instead of returning -EPERM when patch_instruction() fails,
just return what patch_instruction returns.
That simplifies ftrace_modify_code():
0: 94 21 ff c0 stwur1,-64(r1)
4: 93 e1 00 3c stw r31,60(r1)
8: 7c 7f 1b 79
Christophe Leroy wrote:
Since c93d4f6ecf4b ("powerpc/ftrace: Add module_trampoline_target()
for PPC32"), __ftrace_make_nop() for PPC32 is very similar to the
one for PPC64.
Same for __ftrace_make_call().
Make them common.
Signed-off-by: Christophe Leroy
---
arch/powerpc/kernel/trace/ftrace.c
Christophe Leroy wrote:
Since commit 0c0c52306f47 ("powerpc: Only support DYNAMIC_FTRACE not
static"), CONFIG_DYNAMIC_FTRACE is always selected when
CONFIG_FUNCTION_TRACER is selected.
To avoid confusion and have the reader wonder what's happen when
CONFIG_FUNCTION_TRACER is selected and CONFIG_
Christophe Leroy wrote:
PPC_RAW_xxx() macros are self explanatory and less error prone
than open coding.
Use them in ftrace.c
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/ppc-opcode.h | 3 +++
arch/powerpc/kernel/trace/ftrace.c| 32 +--
2 files cha
Christophe Leroy wrote:
A lot of #ifdefs can be replaced by IS_ENABLED()
Do so.
This requires to have kernel_toc_addr() defined at all time
and PPC_INST_LD_TOC as well.
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/code-patching.h | 2 -
arch/powerpc/include/asm/module.h
[2] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d1bcae833b32f1
Signed-off-by: Naveen N. Rao
---
kernel/kexec_file.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index 8347fc158d2b96..55d144c58b5278 100644
--- a/kernel/kexec_fi
entries due to a previous
commit.
[1] https://github.com/linuxppc/issues/issues/388
[2] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d1bcae833b32f1
Signed-off-by: Naveen N. Rao
---
scripts/recordmcount.h | 86 +++---
1 file changed, 73 inserti
eware.org/git/?p=binutils-gdb.git;a=commit;h=d1bcae833b32f1
[3] https://github.com/ClangBuiltLinux/linux/issues/981
Naveen N. Rao (2):
ftrace: Drop duplicate mcount locations
recordmcount: Handle sections with no non-weak symbols
kernel/trace/ftrace.c | 13 +
final vmlinux mcount location table. This will cause
ftrace to fail when trying to patch the same location twice. Fix this by
dropping duplicate locations during ftrace init.
[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d1bcae833b32f1
Signed-off-by: Naveen N. Rao
---
kernel
Steven Rostedt wrote:
On Wed, 27 Apr 2022 15:01:22 +0530
"Naveen N. Rao" wrote:
If one or both of these weak functions are overridden in future, in the
final vmlinux mcount table, references to these will change over to the
non-weak variant which has its own mcount location entr
architectures so that they can validate
the read mcount locations.
- Naveen
Naveen N. Rao (2):
ftrace: Drop duplicate mcount locations
ftrace: recordmcount: Handle sections with no non-weak symbols
Makefile | 4 ++
arch/powerpc/Kconfig | 1 +
arch/powerpc
ues/388
[2] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d1bcae833b32f1
Signed-off-by: Naveen N. Rao
---
Makefile | 4 ++
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/ftrace.h | 8 +--
arch/powerpc/kernel/trace/ftrace.c | 11
k
final vmlinux mcount location table. This will cause
ftrace to fail when trying to patch the same location twice. Fix this by
dropping duplicate locations during ftrace init.
[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d1bcae833b32f1
Signed-off-by: Naveen N. Rao
---
kernel
Steven Rostedt wrote:
On Thu, 28 Apr 2022 13:15:22 +0530
"Naveen N. Rao" wrote:
Indeed, plain old -pg will be a problem. I'm not sure there is a generic
way to address this. I suppose architectures will have to validate the
mcount locations, something like this?
Perhaps anot
Steven Rostedt wrote:
On Thu, 28 Apr 2022 13:15:22 +0530
"Naveen N. Rao" wrote:
Indeed, plain old -pg will be a problem. I'm not sure there is a generic
way to address this. I suppose architectures will have to validate the
mcount locations, something like this?
Perhaps anot
Steven Rostedt wrote:
On Thu, 28 Apr 2022 22:49:52 +0530
"Naveen N. Rao" wrote:
But, with ppc64 elf abi v1 which only supports the old -pg flag, mcount
location can differ between the weak and non-weak variants of a
function. In such scenarios, one of the two mcount entries will
Steven Rostedt wrote:
On Fri, 29 Apr 2022 23:09:19 +0530
"Naveen N. Rao" wrote:
If I'm understanding your suggestion right:
- we now create a new section in each object file: __mcount_loc_weak,
and capture such relocations using weak symbols there.
Yes, but it would be p
Stop using the ftrace trampoline for init section once kernel init is
complete.
Fixes: 67361cf8071286 ("powerpc/ftrace: Handle large kernel configs")
Cc: sta...@vger.kernel.org # v4.20+
Signed-off-by: Naveen N. Rao
---
v2: Update #ifdef to also check for CONFIG_FUNCTION_TRACER to addre
Naveen N. Rao wrote:
kexec_load_purgatory() can fail for many reasons - there is no need to
print an error when encountering unsupported relocations.
This solves a build issue on powerpc with binutils v2.36 and newer [1].
Since commit d1bcae833b32f1 ("ELF: Don't generate unused secti
Michael Ellerman wrote:
diff --git a/arch/powerpc/kernel/vdso/gettimeofday.S
b/arch/powerpc/kernel/vdso/gettimeofday.S
index eb9c81e1c218..0aee255e9cbb 100644
--- a/arch/powerpc/kernel/vdso/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso/gettimeofday.S
@@ -22,12 +22,15 @@
.macro cvdso_call funct
Baoquan He wrote:
On 04/25/22 at 11:11pm, Naveen N. Rao wrote:
kexec_load_purgatory() can fail for many reasons - there is no need to
print an error when encountering unsupported relocations.
This solves a build issue on powerpc with binutils v2.36 and newer [1].
Since commit d1bcae833b32f1
Baoquan He wrote:
On 05/18/22 at 12:26pm, Michael Ellerman wrote:
It seems that recordmcount is not really maintained anymore now that x86
uses objtool?
There've been several threads about fixing recordmcount, but none of
them seem to have lead to a solution.
These weak symbol vs recordmcount
Christophe Leroy wrote:
A lot of #ifdefs can be replaced by IS_ENABLED()
Do so.
This requires to have kernel_toc_addr() defined at all time
as well as PPC_INST_LD_TOC and PPC_INST_STD_LR.
Signed-off-by: Christophe Leroy
---
v2: Moved the setup of pop outside of the big if()/else() in __ftrace
Michael Ellerman wrote:
"Naveen N. Rao" writes:
Michael Ellerman wrote:
diff --git a/arch/powerpc/kernel/vdso/gettimeofday.S
b/arch/powerpc/kernel/vdso/gettimeofday.S
index eb9c81e1c218..0aee255e9cbb 100644
--- a/arch/powerpc/kernel/vdso/gettimeofday.S
+++ b/arch/powerpc/k
purgatory code, so a user really has
no way to do anything about the error even if it is printed.
Good point. I really hadn't noticed the error code in there when I
looked.
I still don't think changing the functionality of the code because of
a tool issue is the right solution.
Ok.
Christophe Leroy wrote:
Le 18/05/2022 à 14:03, Michael Ellerman a écrit :
Michael Ellerman writes:
"Naveen N. Rao" writes:
Christophe Leroy wrote:
A lot of #ifdefs can be replaced by IS_ENABLED()
Do so.
This requires to have kernel_toc_addr() defined at all time
er
architectures.
[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d1bcae833b32f1
Signed-off-by: Naveen N. Rao
---
include/linux/kexec.h | 28
kernel/kexec_file.c | 19 +--
2 files changed, 25 insertions(+), 22 deletions(-)
diff --git a/include
the existing pattern of having architectures #define the
name of the function they want to override in their headers.
[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d1bcae833b32f1
Signed-off-by: Michael Ellerman
Signed-off-by: Naveen N. Rao
---
arch/s390/include/asm/kexec.h |
Andrew Morton wrote:
On Wed, 18 May 2022 23:48:28 +0530 "Naveen N. Rao"
wrote:
Since commit d1bcae833b32f1 ("ELF: Don't generate unused section
symbols") [1], binutils (v2.36+) started dropping section symbols that
it thought were unused. This isn't
Baoquan He wrote:
Hi Eric,
On 05/18/22 at 04:59pm, Eric W. Biederman wrote:
"Naveen N. Rao" writes:
> Since commit d1bcae833b32f1 ("ELF: Don't generate unused section
> symbols") [1], binutils (v2.36+) started dropping section symbols that
> it thought we
Alan Modra wrote:
On Tue, May 17, 2022 at 10:32:09PM +1000, Michael Ellerman wrote:
"Naveen N. Rao" writes:
> Michael Ellerman wrote:
>>
>> diff --git a/arch/powerpc/kernel/vdso/gettimeofday.S
b/arch/powerpc/kernel/vdso/gettimeofday.S
>> index eb9c81e1c218..0a
Stephen Rothwell wrote:
Hi all,
Today's linux-next bboot of the powerpc pseries_le_defconfig build
produced these different kernel messages (diff from yesterday's tree):
- ftrace: allocating 33658 entries in 13 pages
- ftrace: allocated 13 pages with 3 groups
+ ftrace-powerpc: Address of ftrace
Daniel Axtens wrote:
Sathvika Vasireddy writes:
This adds emulation support for the following instruction:
* Set Boolean (setb)
Signed-off-by: Sathvika Vasireddy
---
arch/powerpc/lib/sstep.c | 12
1 file changed, 12 insertions(+)
diff --git a/arch/powerpc/lib/sstep.c b/arch
Christophe Leroy wrote:
For that, create a 32 bits version of patch_imm64_load_insns()
and create a patch_imm_load_insns() which calls
patch_imm32_load_insns() on PPC32 and patch_imm64_load_insns()
on PPC64.
Adapt optprobes_head.S for PPC32. Use PPC_LL/PPC_STL macros instead
of raw ld/std, opt o
Sathvika Vasireddy wrote:
This adds selftests for setb instruction.
Signed-off-by: Sathvika Vasireddy
---
arch/powerpc/include/asm/ppc-opcode.h | 1 +
arch/powerpc/lib/test_emulate_step.c | 28 +++
2 files changed, 29 insertions(+)
diff --git a/arch/powerpc/i
Michael Ellerman wrote:
"Naveen N. Rao" writes:
Daniel Axtens wrote:
Sathvika Vasireddy writes:
This adds emulation support for the following instruction:
* Set Boolean (setb)
Signed-off-by: Sathvika Vasireddy
...
If you do end up respinning the patch, I think it would
| 4 ++--
4 files changed, 34 insertions(+), 5 deletions(-)
Thanks for the fix! Some very minor nits below, but none the less:
Reviewed-by: Naveen N. Rao
diff --git a/arch/powerpc/include/asm/hvcall.h
b/arch/powerpc/include/asm/hvcall.h
index ed6086d57b22..0c92b01a3c3c 100644
--- a/arch/
esn't make sense to "trace the tracer". Users wanting to know about
hcalls are better off enabling the tracepoint here instead.
Reported-by: Naveen N. Rao
Signed-off-by: Nicholas Piggin
---
arch/powerpc/platforms/pseries/lpar.c | 4 ++--
1 file changed, 2 insertions(+), 2 d
--
2 files changed, 5 insertions(+), 11 deletions(-)
Reviewed-by: Naveen N. Rao
- Naveen
Nicholas Piggin wrote:
---
arch/powerpc/platforms/pseries/lpar.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/lpar.c
b/arch/powerpc/platforms/pseries/lpar.c
index 835e7f661a05..a961a7ebeab3 100644
--- a/arch/powerpc/platforms/pse
Michael Ellerman wrote:
"Naveen N. Rao" writes:
Michael Ellerman wrote:
"Naveen N. Rao" writes:
Daniel Axtens wrote:
Sathvika Vasireddy writes:
This adds emulation support for the following instruction:
* Set Boolean (setb)
Signed-off-by: Sathvika Vasireddy
..
Nicholas Piggin wrote:
Excerpts from Naveen N. Rao's message of April 27, 2021 11:59 pm:
Nicholas Piggin wrote:
+ *
+ * H_CONFER from spin locks must be treated separately though and use _notrace
+ * plpar_hcall variants, see yield_to_preempted().
*/
static DEFINE_PER_CPU(unsigned int, hcall
Nicholas Piggin wrote:
Excerpts from Naveen N. Rao's message of May 4, 2021 8:25 pm:
Nicholas Piggin wrote:
Excerpts from Naveen N. Rao's message of April 27, 2021 11:59 pm:
Nicholas Piggin wrote:
+ *
+ * H_CONFER from spin locks must be treated separately though and use _notrace
+ * plpar_hc
Nicholas Piggin wrote:
Excerpts from Michal Suchánek's message of May 4, 2021 6:17 am:
On Mon, May 03, 2021 at 11:34:25AM +0200, Michal Suchánek wrote:
On Mon, May 03, 2021 at 09:11:16AM +0200, Michal Suchánek wrote:
> On Mon, May 03, 2021 at 10:58:33AM +1000, Nicholas Piggin wrote:
> > Excerpt
Sathvika Vasireddy wrote:
This adds emulation support for the following instruction:
* Set Boolean (setb)
Signed-off-by: Sathvika Vasireddy
---
arch/powerpc/lib/sstep.c | 22 ++
1 file changed, 22 insertions(+)
Tested-by: Naveen N. Rao
diff --git a/arch/powerpc
Sathvika Vasireddy wrote:
This adds selftests for setb instruction.
Signed-off-by: Sathvika Vasireddy
---
arch/powerpc/include/asm/ppc-opcode.h | 1 +
arch/powerpc/lib/test_emulate_step.c | 29 +
2 files changed, 30 insertions(+)
Tested-by: Naveen N. Rao
Christophe Leroy wrote:
Le 06/05/2020 à 05:40, Jordan Niethe a écrit :
Do not allow inserting breakpoints on the suffix of a prefix instruction
in kprobes.
Signed-off-by: Jordan Niethe
---
v8: Add this back from v3
---
arch/powerpc/kernel/kprobes.c | 13 +
1 file changed, 13 i
Various fixes and some code refactoring for kprobes on powerpc. The
first patch fixes an invalid access if probing the first instruction in
a kernel module. The rest are small cleanups. More details in the
individual patches.
- Naveen
Naveen N. Rao (5):
powerpc/kprobes: Fix validation of
e Leroy
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/kprobes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index 01ab2163659e4b..f611d9eb3562d7 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch
In kprobes and xmon, we should exclude both 32-bit and 64-bit variants
of mtmsr and rfi instructions from being stepped. Have IS_RFID() also
detect a rfi instruction similar to IS_MTMSRD().
Signed-off-by: Naveen N. Rao
---
arch/powerpc/include/asm/sstep.h | 7 +++
arch/powerpc/kernel
e
can then directly single-step while for other instructions, we can
attempt to emulate and fall back to single stepping if that fails.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/kprobes.c | 62 +--
1 file changed, 16 insertions(+), 46 deletions(-)
diff --
Clean up the function to look sane:
- return immediately on error, rather than pointlessly setting the
return value
- pr_info() instead of printk()
- check return value of patch_instruction()
- and to top it all of: a reverse christmas tree!
Signed-off-by: Naveen N. Rao
---
arch/powerpc
When arming and disarming probes, we currently assume that instruction
patching can never fail, and don't have a mechanism to surface errors.
Add a warning in case instruction patching ever fails.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/kprobes.c | 4 ++--
1 file chang
_step()
in the optprobe trampoline. Fix the same.
Fixes: eacf4c0202654a ("powerpc: Enable OPTPROBES on PPC32")
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/optprobes.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/optprobes.c b/arch
| 14 --
2 files changed, 15 insertions(+), 2 deletions(-)
LGTM. For the series:
Reviewed-by: Naveen N. Rao
- Naveen
Christophe Leroy wrote:
Le 20/05/2021 à 09:29, Naveen N. Rao a écrit :
Trying to use a kprobe on ppc32 results in the below splat:
BUG: Unable to handle kernel data access on read at 0x7c0802a6
Faulting instruction address: 0xc002e9f0
Oops: Kernel access of bad area, sig: 11
Naveen N. Rao (6):
trace/stack: Move code to save the stack trace into a separate
function
powerpc/trace: Add support for stack tracer
powerpc: Indicate traced function name in show_stack()
powerpc/perf: Include traced function in the callchain
powerpc/stacktrace: Include ftraced function
In preparation to add support for stack tracer to powerpc, move code to
save stack trace and to calculate the frame sizes into a separate weak
function. Also provide access to some of the data structures used by the
stack trace code so that architectures can update those.
Signed-off-by: Naveen N
virtqueue_notify+0x40/0x80
17) 4880 240 virtio_queue_rq+0x568/0x610
18) 4640 256 blk_mq_dispatch_rq_list+0x190/0xbc0
19) 4384 160 __blk_mq_do_dispatch_sched+0x1f0/0x3d0
20) 4224 96 __blk_mq_sched_dispatch_requests+0x238/0x2c0
...
Signed-off-by: Naveen N
[c0001ed7fdb0] [c002b6c4] system_call_exception+0xf4/0x200
[c0001ed7fe10] [c000ca5c] system_call_common+0xec/0x278
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/process.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/kernel/process.c b
With -mprofile-kernel and ppc32, the function tracer is invoked before a
function sets up its own stackframe. This results in the traced function
not appearing in stack traces. Fix this by checking for ftrace entry and
including the traced function in the perf callchain.
Signed-off-by: Naveen N
With -mprofile-kernel and ppc32, the function tracer is invoked before a
function sets up its own stackframe. This results in the traced function
not appearing in stack traces. Fix this by checking for ftrace entry and
including the traced function in the stack trace.
Signed-off-by: Naveen N. Rao
With -mprofile-kernel and ppc32, the function tracer is invoked before a
function sets up its own stackframe. This results in the traced function
not appearing in stack traces. Fix this by checking for ftrace entry and
including the traced function in the stack trace.
Signed-off-by: Naveen N. Rao
Christophe Leroy wrote:
Le 20/05/2021 à 12:54, Naveen N. Rao a écrit :
Christophe Leroy wrote:
Le 20/05/2021 à 09:29, Naveen N. Rao a écrit :
diff --git a/arch/powerpc/kernel/optprobes.c
b/arch/powerpc/kernel/optprobes.c
index cdf87086fa33a0..2bc53fa48a1b33 100644
--- a/arch/powerpc
Both these config options are generally enabled in distro kernels.
Enable the same in a few powerpc64 configs to get better coverage and
testing.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/configs/powernv_defconfig | 1 +
arch/powerpc/configs/ppc64_defconfig | 2 ++
arch/powerpc/configs
#t' will run 't' command and produce a backtrace on all cpus
in xmon.
Since many xmon commands are not sensible for running in this manner, we
only allow a predefined list of commands -- 'r', 'S' and 't' for now.
Signe
Daniel Axtens wrote:
Make our stack-walking code KASAN-safe by using READ_ONCE_NOCHECK -
generic code, arm64, s390 and x86 all do this for similar sorts of
reasons: when unwinding a stack, we might touch memory that KASAN has
marked as being out-of-bounds. In ppc64 KASAN development, I hit this
s
Naveen N. Rao wrote:
+
+unsigned long ftrace_get_traced_func_if_no_stackframe(unsigned long ip,
unsigned long *stack)
+{
+ if (!is_ftrace_entry(ip))
+ return 0;
+
+ if (IS_ENABLED(CONFIG_PPC32))
+ return stack[11]; /* see MCOUNT_SAVE_FRAME */
+
+ if
Steven Rostedt wrote:
On Fri, 21 May 2021 12:18:36 +0530
"Naveen N. Rao" wrote:
In preparation to add support for stack tracer to powerpc, move code to
save stack trace and to calculate the frame sizes into a separate weak
function. Also provide access to some of the data structur
Naveen N. Rao wrote:
Trying to use a kprobe on ppc32 results in the below splat:
BUG: Unable to handle kernel data access on read at 0x7c0802a6
Faulting instruction address: 0xc002e9f0
Oops: Kernel access of bad area, sig: 11 [#1]
BE PAGE_SIZE=4K PowerPC 44x Platform
Modules
Christophe Leroy wrote:
Le 07/06/2021 à 19:36, Christophe Leroy a écrit :
Le 07/06/2021 à 16:31, Christophe Leroy a écrit :
Le 07/06/2021 à 13:34, Naveen N. Rao a écrit :
Naveen N. Rao wrote:
Trying to use a kprobe on ppc32 results in the below splat:
BUG: Unable to handle kernel
blrl corrupts the link stack. Instead use bctrl when making function
calls from BPF programs.
Reported-by: Anton Blanchard
Signed-off-by: Naveen N. Rao
---
arch/powerpc/include/asm/ppc-opcode.h | 1 +
arch/powerpc/net/bpf_jit_comp32.c | 4 ++--
arch/powerpc/net/bpf_jit_comp64.c | 12
Christophe Leroy wrote:
Le 09/06/2021 à 11:00, Naveen N. Rao a écrit :
blrl corrupts the link stack. Instead use bctrl when making function
calls from BPF programs.
What's the link stack ? Is it the PPC64 branch predictor stack ?
c974809a26a13e ("powerpc/vdso: Avoid link stack
Balamuruhan S wrote:
add emulate_step() changes to support vsx vector paired storage
access instructions that provides octword operands loads/stores
between storage and set of 64 Vector Scalar Registers (VSRs).
This should be squashed in with the previous patch. Otherwise, emulation
of these i
.
Acked-by: Naveen N. Rao
- Naveen
Christophe Leroy wrote:
Do not silentely ignore a failure of create_branch() in
patch_branch(). Return -ERANGE.
Signed-off-by: Christophe Leroy
---
arch/powerpc/lib/code-patching.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Reviewed-by: Naveen N. Rao
diff --git a/arch
Hi Cascardo,
Thanks for reporting this.
Thadeu Lima de Souza Cascardo wrote:
Hi, there.
We have been investigating an issue we have observed on POWER8 POWERNV systems.
When running the kernel selftests reuseport_bpf_cpu after a CPU hotplug, we see
crashes, in different forms. [1]
Just to re-
Various fixes to the eBPF JIT for powerpc, thanks to some new tests
added by Johan. This series fixes all failures in test_bpf on powerpc64.
There are still some failures on powerpc32 to be looked into.
- Naveen
Naveen N. Rao (8):
powerpc/lib: Add helper to check if offset is within
Add a helper to check if a given offset is within the branch range for a
powerpc conditional branch instruction, and update some sites to use the
new helper.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/include/asm/code-patching.h | 1 +
arch/powerpc/lib/code-patching.c | 7
Add checks to ensure that we never emit branch instructions with
truncated branch offsets.
Suggested-by: Michael Ellerman
Signed-off-by: Naveen N. Rao
---
arch/powerpc/net/bpf_jit.h| 26 --
arch/powerpc/net/bpf_jit_comp.c | 6 +-
arch/powerpc/net
From: Ravi Bangoria
SEEN_STACK is unused on PowerPC. Remove it. Also, have
SEEN_TAILCALL use 0x4000.
Signed-off-by: Ravi Bangoria
Reviewed-by: Christophe Leroy
---
arch/powerpc/net/bpf_jit.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/net/bpf_jit.h b
emitting different number of instructions depending on the
program size.
Suggested-by: Jordan Niethe
Signed-off-by: Naveen N. Rao
---
arch/powerpc/net/bpf_jit.h| 3 +++
arch/powerpc/net/bpf_jit_comp.c | 22 +-
arch/powerpc/net/bpf_jit_comp32.c | 2 +-
arch/powerpc/net
Only ignore the operation if dividing by 1.
Fixes: 156d0e290e969c ("powerpc/ebpf/jit: Implement JIT compiler for extended
BPF")
Signed-off-by: Naveen N. Rao
---
arch/powerpc/net/bpf_jit_comp64.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/p
501 - 600 of 1372 matches
Mail list logo