I haven't been able to participate and help with this as much as I had
hoped, and it doesn't look like I will be able to spend time on powerpc
going forward.
Signed-off-by: Naveen N Rao (AMD)
---
MAINTAINERS | 1 -
1 file changed, 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAI
t a/arch/powerpc/net/bpf_jit_comp64.c
> b/arch/powerpc/net/bpf_jit_comp64.c
> index 233703b06d7c..91f9efe8b8d7 100644
> --- a/arch/powerpc/net/bpf_jit_comp64.c
> +++ b/arch/powerpc/net/bpf_jit_comp64.c
> @@ -225,6 +225,15 @@ int bpf_jit_emit_func_call_rel(u32 *image, u32 *fimage,
> struct codegen_context *
> }
>
> #ifdef CONFIG_PPC_KERNEL_PCREL
> + /*
> + * If fimage is NULL (the initial pass to find image size),
> + * account for the maximum no. of instructions possible.
> + */
> + if (!fimage) {
> + ctx->idx += 7;
> + return 0;
> + }
> +
I would merge this with the below if conditional so that this gets
noticed if the instruction sequence below ever changes.
> reladdr = func_addr - local_paca->kernelbase;
>
> if (reladdr < (long)SZ_8G && reladdr >= -(long)SZ_8G) {
Other than that:
Acked-by: Naveen N Rao (AMD)
- Naveen
b/arch/powerpc/kernel/trace/ftrace_entry.S
> @@ -212,10 +212,10 @@
> bne-1f
>
> mr r3, r15
> +1: mtlrr3
> .if \allregs == 0
> REST_GPR(15, r1)
> .endif
> -1: mtlrr3
> #endif
LGTM.
Acked-by: Naveen N Rao (AMD)
- Naveen
On Wed, Mar 26, 2025 at 08:04:22PM +0530, Hari Bathini wrote:
> The JIT compile of ldimm instructions can be anywhere between 1-5
> instructions long depending on the value being loaded.
>
> arch_bpf_trampoline_size() provides JIT size of the BPF trampoline
> before the buffer for JIT'ing it is al
On Tue, Apr 01, 2025 at 02:48:10PM +0200, Jiri Olsa wrote:
> On Mon, Mar 31, 2025 at 10:09:40AM -0400, Steven Rostedt wrote:
> > On Mon, 31 Mar 2025 21:19:36 +0800
> > Shung-Hsi Yu wrote:
> >
> > > Hi all,
> > >
> > > On ppc64le (v6.14, kernel config attached), I've observed that fentry
> > > BP
ze / sizeof(*stub);
num_stubs = roundup(me->arch.ool_stub_count * sizeof(struct
ftrace_ool_stub),
sizeof(struct ppc64_stub_entry)) / sizeof(struct
ppc64_stub_entry);
Regardless of that, for this patch:
Acked-by: Naveen N Rao (AMD)
- Naveen
that I can help with the odd query.
Signed-off-by: Naveen N Rao
---
MAINTAINERS | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 05f14b67cd74..c7a931ee7a2e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3878,8 +3878,10 @@ S: Odd Fixes
F
I have switched to using my @kernel.org id for my contributions. Update
MAINTAINERS and mailmap to reflect the same.
Cc: Naveen N. Rao
Signed-off-by: Naveen N Rao
---
.mailmap| 2 ++
MAINTAINERS | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/.mailmap b/.mailmap
fall back to using a fixed
offset of 8 (two instructions) to categorize a probe as being at
function entry for 64-bit elfv2, unless we are using pcrel.
Acked-by: Masami Hiramatsu (Google)
Signed-off-by: Naveen N Rao
---
arch/powerpc/kernel/kprobes.c | 18 --
1 file changed, 8
-entry, and is unlikely to support
-mprofile-kernel.
Update our Makefile checks so that we pick up the correct files to build
once clang picks up support for -fpatchable-function-entry.
[*] https://github.com/llvm/llvm-project/issues/57031
Signed-off-by: Naveen N Rao
---
arch/powerpc/kernel/trace
that we can detect this at build time, and break the build if
necessary.
We add a dependency on !COMPILE_TEST for CONFIG_HAVE_FUNCTION_TRACER so
that allyesconfig and other test builds can continue to work without
enabling ftrace.
Signed-off-by: Naveen N Rao
---
arch/powerpc/Kconfig
f program since they all
work with the kernel TOC. We only need to do it if we have to call out
to a module function. So, guard TOC load/restore with appropriate
conditions.
Signed-off-by: Naveen N Rao
---
arch/powerpc/net/bpf_jit_comp64.c | 61 +--
1 file changed
Move the ftrace stub used to cover inittext before _einittext so that it
is within kernel text, as seen through core_kernel_text(). This is
required for a subsequent change to ftrace.
Signed-off-by: Naveen N Rao
---
arch/powerpc/kernel/vmlinux.lds.S | 3 +--
1 file changed, 1 insertion(+), 2
To simplify upcoming changes to ftrace, add a check to skip actual
instruction patching if the old and new instructions are the same. We
still validate that the instruction is what we expect, but don't
actually patch the same instruction again.
Signed-off-by: Naveen N Rao
---
arch/po
architectures.
Reviewed-by: Nicholas Piggin
Signed-off-by: Naveen N Rao
---
arch/powerpc/include/asm/ftrace.h| 1 -
arch/powerpc/kernel/trace/ftrace.c | 49 +
arch/powerpc/kernel/trace/ftrace_64_pg.c | 69 ++--
3 files changed, 56 insertions(+), 63
Minor refactor for converting #ifdef to IS_ENABLED().
Reviewed-by: Nicholas Piggin
Signed-off-by: Naveen N Rao
---
arch/powerpc/kernel/module_64.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
erefore is
not necessary unless ftrace is enabled. Nop it out during ftrace init.
When ftrace is enabled, we want the 'stw' so that stack unwinding works
properly. Perform the same within the ftrace handler, similar to 64-bit
powerpc.
Reviewed-by: Nicholas Piggin
Signed-off-by: Nav
nel boot.
With this change, we now use the same 2-instruction profiling sequence
with both -mprofile-kernel, as well as -fpatchable-function-entry on
64-bit powerpc.
Signed-off-by: Naveen N Rao
---
arch/powerpc/kernel/trace/ftrace.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff
that other cpus
execute isync (or some CSI) so that they don't go back into the
trampoline again.
Signed-off-by: Naveen N Rao
---
arch/powerpc/include/asm/ppc-opcode.h | 14 +
arch/powerpc/net/bpf_jit.h| 12 +
arch/powerpc/net/bpf_jit_comp.c | 842 +
Add powerpc 32-bit and 64-bit samples for ftrace direct. This serves to
show the sample instruction sequence to be used by ftrace direct calls
to adhere to the ftrace ABI.
On 64-bit powerpc, TOC setup requires some additional work.
Signed-off-by: Naveen N Rao
---
arch/powerpc/Kconfig
pr3 that can then be tested on the
return path from the ftrace trampoline to branch into the direct caller.
Signed-off-by: Naveen N Rao
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/ftrace.h| 15 +++
arch/powerpc/kernel/asm-offsets.c| 3 +
a
entry, we load from
this location and call into ftrace_ops->func().
For 64-bit powerpc, we ensure that the out-of-line stub area is
doubleword aligned so that ftrace_ops address can be updated atomically.
Signed-off-by: Naveen N Rao
---
arch/powerpc/Kconfig | 1 +
arch
pport vmlinux .text
size up to ~64MB.
Signed-off-by: Naveen N Rao
---
arch/powerpc/Kconfig | 12
arch/powerpc/include/asm/ftrace.h | 6 --
arch/powerpc/kernel/trace/ftrace.c | 21 +
arch/powerpc/kernel/trace/ftrace_en
r2,r2,-16028
b ftrace_ool_stub_text_end+0x11b28
mfocrf r11,8
...
The associated stub:
:
mflrr0
bl ftrace_caller
mtlrr0
b kernel_clone+0xc
...
Signed-off-by: Naveen N Rao
---
arch/powerpc/Kconfig
//tools/Makefile with .arch.vmlinux.o target, which
will be invoked prior to the final vmlinux link step.
Signed-off-by: Naveen N Rao
---
arch/Kconfig | 6 ++
scripts/Makefile.vmlinux | 8
scripts/link-vmlinux.sh | 11 ---
3 files changed, 22 insertions(+), 3
structions during trampoline
attach/detach.
- Naveen
Naveen N Rao (17):
powerpc/trace: Account for -fpatchable-function-entry support by
toolchain
powerpc/kprobes: Use ftrace to determine if a probe is at function
entry
powerpc64/ftrace: Nop out additional 'std' instru
Hi Vishal,
Vishal Chourasia wrote:
On Fri, Jun 21, 2024 at 12:24:03AM +0530, Naveen N Rao wrote:
This is v3 of the patches posted here:
http://lkml.kernel.org/r/cover.1718008093.git.nav...@kernel.org
Since v2, I have addressed review comments from Steven and Masahiro
along with a few fixes
Greg Kroah-Hartman wrote:
On Mon, Jul 08, 2024 at 11:16:48PM -0400, matoro wrote:
On 2024-07-05 16:34, Vitaly Chikunov wrote:
> Hi,
>
> There is new WARNING and Oops on ppc64le in v6.6.37 when running LTP tests:
> bpf_prog01, bpf_prog02, bpf_prog04, bpf_prog05, prctl04. Logs excerpt
> below. I
Masami Hiramatsu wrote:
On Thu, 27 Jun 2024 09:21:01 -0400
Abhishek Dubey wrote:
+/* rethook initializer */
+int __init arch_init_kprobes(void)
+{
+ return register_kprobe(&trampoline_p);
+}
No, please don't use arch_init_kprobes() for initializing rethook, since
rethook is used from f
On Mon, Jul 01, 2024 at 09:03:52PM GMT, Nicholas Piggin wrote:
> On Fri Jun 21, 2024 at 5:09 AM AEST, Naveen N Rao wrote:
> > Add support for bpf_arch_text_poke() and arch_prepare_bpf_trampoline()
> > for 64-bit powerpc.
>
> What do BPF trampolines give you?
At a very basic
On Mon, Jul 01, 2024 at 08:39:03PM GMT, Nicholas Piggin wrote:
> On Fri Jun 21, 2024 at 4:54 AM AEST, Naveen N Rao wrote:
> > Function profile sequence on powerpc includes two instructions at the
> > beginning of each function:
> > mflrr0
> > bl ftrace
On Mon, Jul 01, 2024 at 07:27:55PM GMT, Nicholas Piggin wrote:
> On Fri Jun 21, 2024 at 4:54 AM AEST, Naveen N Rao wrote:
> > Pointer to struct module is only relevant for ftrace records belonging
> > to kernel modules. Having this field in dyn_arch_ftrace wastes memory
> > f
On Mon, Jul 01, 2024 at 06:57:12PM GMT, Nicholas Piggin wrote:
> On Fri Jun 21, 2024 at 4:54 AM AEST, Naveen N Rao wrote:
> > On 32-bit powerpc, gcc generates a three instruction sequence for
> > function profiling:
> > mflrr0
> > stw r0, 4(r1)
> &g
Hi Nick,
Thanks for the reviews!
On Mon, Jul 01, 2024 at 06:40:50PM GMT, Nicholas Piggin wrote:
> On Fri Jun 21, 2024 at 4:54 AM AEST, Naveen N Rao wrote:
> > Rather than hard-coding the offset into a function to be used to
> > determine if a kprobe is at function entry, use ftrac
auses the handlers to fire
> + */
> +asm(".global arch_rethook_trampoline\n"
> + ".type arch_rethook_trampoline, @function\n"
> + "arch_rethook_trampoline:\n"
> + "nop\n"
> + "blr\n"
> + ".size arch_reth
with a 'blr'. The
trampoline code itself closely follows x86 implementation.
While the code is generic, BPF trampolines are only enabled on 64-bit
powerpc. 32-bit powerpc will need testing and some updates.
Signed-off-by: Naveen N Rao
---
arch/powerpc/include/asm/ppc-opcode.h |
f program since they all
work with the kernel TOC. We only need to do it if we have to call out
to a module function. So, guard TOC load/restore with appropriate
conditions.
Signed-off-by: Naveen N Rao
---
arch/powerpc/net/bpf_jit_comp64.c | 61 +--
1 file changed
Add powerpc 32-bit and 64-bit samples for ftrace direct. This serves to
show the sample instruction sequence to be used by ftrace direct calls
to adhere to the ftrace ABI.
On 64-bit powerpc, TOC setup requires some additional work.
Signed-off-by: Naveen N Rao
---
arch/powerpc/Kconfig
pr3 that can then be tested on the
return path from the ftrace trampoline to branch into the direct caller.
Signed-off-by: Naveen N Rao
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/ftrace.h| 15
arch/powerpc/kernel/asm-offsets.c| 3 +
arch/powe
fall back to using a fixed
offset of 8 (two instructions) to categorize a probe as being at
function entry for 64-bit elfv2, unless we are using pcrel.
Acked-by: Masami Hiramatsu (Google)
Signed-off-by: Naveen N Rao
---
arch/powerpc/kernel/kprobes.c | 18 --
1 file changed, 8
entry, we load from
this location and call into ftrace_ops->func().
For 64-bit powerpc, we ensure that the out-of-line stub area is
doubleword aligned so that ftrace_ops address can be updated atomically.
Signed-off-by: Naveen N Rao
---
arch/powerpc/Kconfig | 1 +
arch
and enabled by default only on 64-bit powerpc.
Signed-off-by: Naveen N Rao
---
arch/powerpc/Kconfig | 5 +
arch/powerpc/Makefile | 4 +
arch/powerpc/include/asm/ftrace.h | 10 ++
arch/powerpc/include/asm/module.h | 5 +
arch/pow
//tools/Makefile with .arch.vmlinux.o target, which
will be invoked prior to the final vmlinux link step.
Signed-off-by: Naveen N Rao
---
arch/Kconfig | 3 +++
scripts/Makefile.vmlinux | 8
scripts/link-vmlinux.sh | 11 ---
3 files changed, 19 insertions(+), 3 deletions
architectures.
Signed-off-by: Naveen N Rao
---
arch/powerpc/include/asm/ftrace.h| 1 -
arch/powerpc/kernel/trace/ftrace.c | 54 +++---
arch/powerpc/kernel/trace/ftrace_64_pg.c | 73 +++-
3 files changed, 65 insertions(+), 63 deletions(-)
diff --git a/arch
Minor refactor for converting #ifdef to IS_ENABLED().
Signed-off-by: Naveen N Rao
---
arch/powerpc/kernel/module_64.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
index e9bab599d0c2
used to emit a three
instruction sequence for function profiling (with -mprofile-kernel) with
a 'std' instruction to mimic the 'stw' above. Address that scenario also
by nop-ing out the 'std' instruction during ftrace init.
Signed-off-by: Naveen N Rao
---
arch/powerpc/kernel/tr
series depends on the patch series from Benjamin Gray adding
support for patch_ulong():
http://lkml.kernel.org/r/20240515024445.236364-1-bg...@linux.ibm.com
- Naveen
Naveen N Rao (11):
powerpc/kprobes: Use ftrace to determine if a probe is at function
entry
powerpc/ftrace: Unify 32-bit
On Tue, Jun 18, 2024 at 06:43:06AM GMT, Masami Hiramatsu wrote:
> On Mon, 17 Jun 2024 18:28:07 +0530
> Naveen N Rao wrote:
>
> > Hi Abhishek,
> >
> > On Mon, Jun 10, 2024 at 11:45:09AM GMT, Abhishek Dubey wrote:
> > > This is an adaptation of commi
Hi Abhishek,
On Mon, Jun 10, 2024 at 11:45:09AM GMT, Abhishek Dubey wrote:
> This is an adaptation of commit f3a112c0c40d ("x86,rethook,kprobes:
> Replace kretprobe with rethook on x86") to PowerPC.
>
> Replaces the kretprobe code with rethook on Power. With this patch,
> kretprobe on Power uses
On Tue, Jun 11, 2024 at 11:05:56PM GMT, Naveen N Rao wrote:
> On Tue, Jun 11, 2024 at 06:51:51AM GMT, Masahiro Yamada wrote:
> > On Tue, Jun 11, 2024 at 2:20 AM Naveen N Rao wrote:
> > >
> > > On Mon, Jun 10, 2024 at 06:14:51PM GMT, Masahiro Yamada wrote:
> > &g
On Tue, Jun 11, 2024 at 06:51:51AM GMT, Masahiro Yamada wrote:
> On Tue, Jun 11, 2024 at 2:20 AM Naveen N Rao wrote:
> >
> > On Mon, Jun 10, 2024 at 06:14:51PM GMT, Masahiro Yamada wrote:
> > > On Mon, Jun 10, 2024 at 5:39 PM Naveen N Rao wrote:
> > > >
>
On Mon, Jun 10, 2024 at 04:06:32PM GMT, Steven Rostedt wrote:
> On Mon, 10 Jun 2024 14:08:16 +0530
> Naveen N Rao wrote:
>
> > On 32-bit powerpc, gcc generates a three instruction sequence for
> > function profiling:
> > mflrr0
> > stw
On Mon, Jun 10, 2024 at 04:03:56PM GMT, Steven Rostedt wrote:
> On Mon, 10 Jun 2024 14:08:15 +0530
> Naveen N Rao wrote:
>
> > Pointer to struct module is only relevant for ftrace records belonging
> > to kernel modules. Having this field in dyn_arch_ftrace wastes memo
On Mon, Jun 10, 2024 at 06:14:51PM GMT, Masahiro Yamada wrote:
> On Mon, Jun 10, 2024 at 5:39 PM Naveen N Rao wrote:
> >
> > On powerpc, we would like to be able to make a pass on vmlinux.o and
> > generate a new object file to be linked into vmlinux. Add a generic pass
&
and enabled by default only on 64-bit powerpc.
Signed-off-by: Naveen N Rao
---
arch/powerpc/Kconfig | 4 +
arch/powerpc/Makefile| 4 +
arch/powerpc/include/asm/ftrace.h| 10 ++
arch/powerpc/include/asm/module.h| 5 +
arch/powerpc/kerne
fall back to using a fixed
offset of 8 (two instructions) to categorize a probe as being at
function entry for 64-bit elfv2, unless we are using pcrel.
Acked-by: Masami Hiramatsu (Google)
Signed-off-by: Naveen N Rao
---
arch/powerpc/kernel/kprobes.c | 18 --
1 file changed, 8
/vmlinux_o.sh, which will be invoked prior to
the final vmlinux link step.
Signed-off-by: Naveen N Rao
---
arch/Kconfig| 3 +++
scripts/link-vmlinux.sh | 18 +++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index
used to emit a three
instruction sequence for function profiling (with -mprofile-kernel) with
a 'std' instruction to mimic the 'stw' above. Address that scenario also
by nop-ing out the 'std' instruction during ftrace init.
Signed-off-by: Naveen N Rao
---
arch/powerpc/kernel/tr
architectures.
Signed-off-by: Naveen N Rao
---
arch/powerpc/include/asm/ftrace.h| 1 -
arch/powerpc/kernel/trace/ftrace.c | 47 ++-
arch/powerpc/kernel/trace/ftrace_64_pg.c | 73 +++-
3 files changed, 64 insertions(+), 57 deletions(-)
diff --git a/arch
roach.
Thanks,
Naveen
Naveen N Rao (5):
powerpc/kprobes: Use ftrace to determine if a probe is at function
entry
powerpc/ftrace: Remove pointer to struct module from dyn_arch_ftrace
powerpc/ftrace: Unify 32-bit and 64-bit ftrace entry code
kbuild: Add generic hook for architectures t
enghani
> ---
> v1 -> v2:
> 1. Remove helpers of extended_cede_processor()
Acked-by: Naveen N Rao
>
> arch/powerpc/include/asm/plpar_wrappers.h | 28 ---
> 1 file changed, 28 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/plpar_wrapp
On Tue, May 14, 2024 at 03:35:03PM GMT, Gautam Menghani wrote:
> Remove extended_cede_processor() definition as it has no callers since
> commit 48f6e7f6d948("powerpc/pseries: remove cede offline state for CPUs")
extended_cede_processor() was added in commit 69ddb57cbea0
("powerpc/pseries: Add ex
On Tue, May 14, 2024 at 04:39:30AM GMT, Christophe Leroy wrote:
>
>
> Le 14/05/2024 à 04:59, Benjamin Gray a écrit :
> > On Tue, 2024-04-23 at 15:09 +0530, Naveen N Rao wrote:
> >> On Mon, Mar 25, 2024 at 04:53:00PM +1100, Benjamin Gray wrote:
> >>> This use
dbe6e2456fb0 ("powerpc/bpf/64: add support for atomic fetch operations")
Fixes: 1e82dfaa7819 ("powerpc/bpf/64: Add instructions for atomic_[cmp]xchg")
> Signed-off-by: Puranjay Mohan
> Acked-by: Paul E. McKenney
Cc: sta...@vger.kernel.org # v6.0+
I have tested this with test_bpf and test_progs.
Reviewed-by: Naveen N Rao
- Naveen
On Wed, May 08, 2024 at 11:54:04AM GMT, Puranjay Mohan wrote:
> The Linux Kernel Memory Model [1][2] requires RMW operations that have a
> return value to be fully ordered.
>
> BPF atomic operations with BPF_FETCH (including BPF_XCHG and
> BPF_CMPXCHG) return a value back so they need to be JITed
return -EINVAL;
>
> - if (IS_ENABLED(CONFIG_PPC_KERNEL_PCREL)) {
> - reladdr = func_addr - local_paca->kernelbase;
> +#ifdef CONFIG_PPC_KERNEL_PCREL
Would be good to retain use of IS_ENABLED().
Reviewed-by: Naveen N Rao
- Naveen
F || reladdr < -(0x8000L)) {
> @@ -233,9 +235,9 @@ static int bpf_jit_emit_func_call_hlp(u32 *image, struct
> codegen_context *ctx, u
>
> EMIT(PPC_RAW_ADDIS(_R12, _R2, PPC_HA(reladdr)));
> EMIT(PPC_RAW_ADDI(_R12, _R12, PPC_LO(reladdr)));
> - EMIT(PPC_RAW_MTCTR(_R12));
> - EMIT(PPC_RAW_BCTRL());
> }
> + EMIT(PPC_RAW_MTCTR(_R12));
> + EMIT(PPC_RAW_BCTRL());
This change shouldn't be necessary since these instructions are moved
back into the conditional in the next patch.
Other than those minor comments:
Reviewed-by: Naveen N Rao
- Naveen
_to_ns(be64_to_cpu(lp->l2_to_l1_cs_tb));
> + l2_runtime_ns = tb_to_ns(be64_to_cpu(lp->l2_runtime_tb));
> + trace_kvmppc_vcpu_stats(vcpu, l1_to_l2_ns - local_paca->l1_to_l2_cs,
> + l2_to_l1_ns - local_paca->l2_to_l1_cs,
> +
On Wed, Apr 24, 2024 at 11:08:38AM +0530, Gautam Menghani wrote:
> On Mon, Apr 22, 2024 at 09:15:02PM +0530, Naveen N Rao wrote:
> > On Tue, Apr 02, 2024 at 12:36:54PM +0530, Gautam Menghani wrote:
> > > static int kvmhv_vcpu_entry_nestedv2(struct kvm_vcpu *vcpu, u64
c/platforms/powermac/smp.c| 2 +-
> 6 files changed, 132 insertions(+), 20 deletions(-)
Apart from the minor comments, for this series:
Acked-by: Naveen N Rao
Thanks for working on this.
- Naveen
On Mon, Mar 25, 2024 at 04:53:00PM +1100, Benjamin Gray wrote:
> This use of patch_instruction() is working on 32 bit data, and can fail
> if the data looks like a prefixed instruction and the extra write
> crosses a page boundary. Use patch_u32() to fix the write size.
>
> Fixes: 8734b41b3efe ("p
On Mon, Mar 25, 2024 at 04:53:02PM +1100, Benjamin Gray wrote:
> Extend the code patching selftests with some basic coverage of the new
> data patching variants too.
>
> Signed-off-by: Benjamin Gray
>
> ---
>
> v3: * New in v3
> ---
> arch/powerpc/lib/test-code-patching.c | 36
On Tue, Apr 02, 2024 at 12:36:54PM +0530, Gautam Menghani wrote:
> PAPR hypervisor has introduced three new counters in the VPA area of
> LPAR CPUs for KVM L2 guest (see [1] for terminology) observability - 2
> for context switches from host to guest and vice versa, and 1 counter
> for getting the
On Tue, Apr 02, 2024 at 04:28:06PM +0530, Hari Bathini wrote:
> Currently, bpf jit code on powerpc assumes all the bpf functions and
> helpers to be kernel text. This is false for kfunc case, as function
> addresses can be module addresses as well. So, ensure module addresses
> are supported to ena
On Tue, Feb 13, 2024 at 07:54:27AM +, Christophe Leroy wrote:
>
>
> Le 01/02/2024 à 18:12, Hari Bathini a écrit :
> > With module addresses supported, override bpf_jit_supports_kfunc_call()
> > to enable kfunc support. Module address offsets can be more than 32-bit
> > long, so override bpf_j
On Thu, Feb 01, 2024 at 10:42:48PM +0530, Hari Bathini wrote:
> Currently, bpf jit code on powerpc assumes all the bpf functions and
> helpers to be kernel text. This is false for kfunc case, as function
> addresses are mostly module addresses in that case. Ensure module
> addresses are supported t
entry")
Cc: sta...@vger.kernel.org
Reported-by: Michael Ellerman
Signed-off-by: Naveen N Rao
Reviewed-by: Benjamin Gray
---
v2:
- Rename exit text section variable name to match other architectures
- Fix clang builds
I've collected Benjamin's Reviewed-by tag since those parts of the pat
On Mon, Feb 12, 2024 at 07:31:03PM +, Christophe Leroy wrote:
>
>
> Le 09/02/2024 à 08:59, Naveen N Rao a écrit :
> > diff --git a/arch/powerpc/include/asm/sections.h
> > b/arch/powerpc/include/asm/sections.h
> > index ea26665f82cf..d389dcecdb0b 100644
> &g
entry")
Cc: sta...@vger.kernel.org
Reported-by: Michael Ellerman
Signed-off-by: Naveen N Rao
---
arch/powerpc/include/asm/ftrace.h | 9 +
arch/powerpc/include/asm/sections.h | 1 +
arch/powerpc/kernel/trace/ftrace.c | 12
arch/powerpc/kernel/vmlinux.lds.S | 2 ++
On Mon, Feb 05, 2024 at 01:30:46PM +1100, Benjamin Gray wrote:
> On Thu, 2023-11-30 at 15:55 +0530, Naveen N Rao wrote:
> > On Mon, Oct 16, 2023 at 04:01:45PM +1100, Benjamin Gray wrote:
> > >
> > > diff --git a/arch/powerpc/include/asm/code-patching.h
> >
[unknown]
[unknown]
__clone
-multipathd (698)
3001661
Fixes: 7fa95f9adaee ("powerpc/64s: system call support for scv/rfscv
instructions")
Cc: sta...@vger.kernel.org
Reported-by: Nysal Jan K.A
Signed-off-by: Naveen N Rao
---
v2: Update change log,
On Fri, Feb 02, 2024 at 01:02:39PM +1100, Michael Ellerman wrote:
> Segher Boessenkool writes:
> > Hi!
> >
> > On Thu, Jan 25, 2024 at 05:12:28PM +0530, Naveen N Rao wrote:
> >> diff --git a/arch/powerpc/kernel/interrupt_64.S
> >> b/arch/powerpc/kernel
-python (1293)
11
clock_nanosleep
clock_nanosleep
nanosleep
sleep
[unknown]
[unknown]
__clone
-multipathd (698)
3001661
Reported-by: Nysal Jan K.A
Signed-off-by: Naveen N Rao
All supported compilers today (gcc v5.1+ and clang v11+) have support for
-mcmodel=medium. As such, NO_MINIMAL_TOC is no longer being set. Remove
NO_MINIMAL_TOC as well as the fallback to -mminimal-toc.
Reviewed-by: Christophe Leroy
Signed-off-by: Naveen N Rao
---
v2: Drop the call to cc-option
On Tue, Jan 09, 2024 at 12:39:36PM -0600, Segher Boessenkool wrote:
> On Tue, Jan 09, 2024 at 03:15:35PM +, Christophe Leroy wrote:
> > > CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcall-aixdesc)
> > > endif
> > > endif
> > > -CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium
All supported compilers today (gcc v5.1+ and clang v11+) have support for
-mcmodel=medium. As such, NO_MINIMAL_TOC is no longer being set. Remove
NO_MINIMAL_TOC as well as the fallback to -mminimal-toc.
Signed-off-by: Naveen N Rao
---
arch/powerpc/Makefile | 6 +-
arch
On Thu, Dec 21, 2023 at 10:46:08AM +, Christophe Leroy wrote:
>
>
> Le 08/12/2023 à 17:30, Naveen N Rao a écrit :
> > Function profile sequence on powerpc includes two instructions at the
> > beginning of each function:
> >
> > mflrr0
> >
On Wed, Dec 20, 2023 at 10:26:21PM +0530, Hari Bathini wrote:
> Currently, bpf jit code on powerpc assumes all the bpf functions and
> helpers to be kernel text. This is false for kfunc case, as function
> addresses are mostly module addresses in that case. Ensure module
> addresses are supported t
On Thu, Dec 14, 2023 at 05:55:33AM +, Nicholas Miehlbradt wrote:
> KMSAN does not unpoison the ainsn field of a kprobe struct correctly.
> Manually unpoison it to prevent false positives.
>
> Signed-off-by: Nicholas Miehlbradt
> ---
> arch/powerpc/kernel/kprobes.c | 2 ++
> 1 file changed, 2
Michael Ellerman wrote:
Aneesh and Naveen are helping out with some aspects of upstream
maintenance, add them as reviewers.
Signed-off-by: Michael Ellerman
---
MAINTAINERS | 2 ++
1 file changed, 2 insertions(+)
Acked-by: Naveen N. Rao
Thanks,
Naveen
diff --git a/MAINTAINERS b
Replace seven spaces with a tab character to fix an indentation issue
reported by the kernel test robot.
Reported-by: kernel test robot
Closes:
https://lore.kernel.org/oe-kbuild-all/202311221731.aluwtdim-...@intel.com/
Signed-off-by: Naveen N Rao
---
arch/powerpc/include/asm/ftrace.h | 2
Add powerpc 32-bit and 64-bit samples for ftrace direct. This serves to
show the sample instruction sequence to be used by ftrace direct calls
to adhere to the ftrace ABI.
On 64-bit powerpc, TOC setup requires some additional work.
Signed-off-by: Naveen N Rao
---
arch/powerpc/Kconfig
pr3 that can then be tested on the
return path from the ftrace trampoline to branch into the direct caller.
Signed-off-by: Naveen N Rao
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/ftrace.h| 15
arch/powerpc/kernel/asm-offsets.c| 3 +
arch/powe
call into
ftrace_ops->func().
For 64-bit powerpc, we also select FUNCTION_ALIGNMENT_8B so that the
ftrace_ops pointer is double word aligned and can be updated atomically.
Signed-off-by: Naveen N Rao
---
arch/powerpc/Kconfig | 2 +
arch/powerpc/kernel/asm-offsets.c
on (excluding the one or two instructions for supporting
DYNAMIC_FTRACE_WITH_CALL_OPS). On 64-bit powerpc with the current
implementation of -fpatchable-function-entry though, this is not
avoidable since we are forced to emit 6 instructions between the GEP and
the LEP even if we are to only supp
fall back to using a fixed
offset of 8 (two instructions) to categorize a probe as being at
function entry for 64-bit elfv2.
Signed-off-by: Naveen N Rao
---
arch/powerpc/kernel/kprobes.c | 18 --
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/arch/powerpc/kernel
From: Sathvika Vasireddy
Commit d49a0626216b95 ("arch: Introduce CONFIG_FUNCTION_ALIGNMENT")
introduced a generic function-alignment infrastructure. Move to using
FUNCTION_ALIGNMENT_4B on powerpc, to use the same alignment as that of
the existing _GLOBAL macro.
Signed-off-by: Sathvika Vasireddy
ftrace_stub is within the same CU, so there is no need for a subsequent
nop instruction.
Signed-off-by: Naveen N Rao
---
arch/powerpc/kernel/trace/ftrace_entry.S | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/powerpc/kernel/trace/ftrace_entry.S
b/arch/powerpc/kernel/trace
used to emit a three
instruction sequence for function profiling (with -mprofile-kernel) with
a 'std' instruction to mimic the 'stw' above. Address that scenario also
by nop-ing out the 'std' instruction during ftrace init.
Signed-off-by: Naveen N Rao
---
arch/powerpc/kernel/tr
se ok.
- Naveen
Naveen N Rao (8):
powerpc/ftrace: Fix indentation in ftrace.h
powerpc/ftrace: Unify 32-bit and 64-bit ftrace entry code
powerpc/ftrace: Remove nops after the call to ftrace_stub
powerpc/kprobes: Use ftrace to determine if a probe is at function
entry
powerpc/ftrace: Updat
1 - 100 of 1061 matches
Mail list logo