Uros Bizjak wrote:
The workaround for 'asm goto' miscompilation introduces a compiler
barrier quirk that inhibits many useful compiler optimizations. For
example, __try_cmpxchg_user compiles to:
11375: 41 8b 4d 00 mov0x0(%r13),%ecx
11379: 41 8b 02
Christophe Leroy wrote:
Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit :
objtool is throwing *unannotated intra-function call* warnings in
.c files with a few instructions that are marked unreachable. The
problem comes from the annotate_unreachable() macro that is
called by unreachable(). T
Christophe Leroy wrote:
Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit :
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 4c466acdc70d..dc05cd23c233 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -237,6 +237,7 @@ config PPC
select HAVE_MOD_ARCH_SPECIF
Segher Boessenkool wrote:
On Wed, Aug 31, 2022 at 12:50:07PM +, Christophe Leroy wrote:
Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit :
> + opcode = insn >> 26;
> +
> + switch (opcode) {
> + case 18: /* bl */
case 18 is more than 'bl', it includes also 'b'.
In both cases, the calcula
Peter Zijlstra wrote:
On Mon, Aug 29, 2022 at 11:22:12AM +0530, Sathvika Vasireddy wrote:
With objtool enabled, below warnings are seen when trying to build:
drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: aes_p8_set_encrypt_key+0x44:
unannotated intra-function call
drivers/crypto/vmx/aesp8
Peter Zijlstra wrote:
On Mon, Aug 29, 2022 at 11:22:18AM +0530, Sathvika Vasireddy wrote:
Architectures can select HAVE_NOP_MCOUNT if they choose
to nop out mcount call sites. If that config option is
selected, then --mnop is passed as an option to objtool,
along with --mcount.
Also, make sure
kernel test robot wrote:
Hi Sathvika,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on powerpc/topic/ppc-kvm]
[also build test ERROR on linus/master v6.0-rc5]
[cannot apply to powerpc/next masahiroy-kbuild/for-next next-20220912]
[If your patch is applied to the wron
5100 ("scripts/faddr2line: Fix overlapping text section
failures")
Reference: https://lore.kernel.org/bpf/20191211160133.GB4580@calabresa/
Cc: "Naveen N. Rao"
Cc: Jiri Olsa
Cc: Thadeu Lima de Souza Cascardo
Reviewed-by: Thadeu Lima de Souza Cascardo
The other instances of read
amp;
+ ppc_inst_prefixed(ppc_inst_read(prev->ainsn.insn))) {
printk("Cannot register a kprobe on the second word of prefixed
instruction\n");
ret = -EINVAL;
}
It's fine to keep the if condition on a single line.
Other than that, thanks for the fix!
Reviewed-by: Naveen N. Rao
- Naveen
Sathvika Vasireddy wrote:
Objtool throws unannotated intra-function call warnings in the following
assembly files:
arch/powerpc/kernel/vector.o: warning: objtool: .text+0x53c: unannotated
intra-function call
arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x60:
unannotated in
Sathvika Vasireddy wrote:
Some architectures (powerpc) may not support ftrace locations being nop'ed
out at build time. Introduce CONFIG_HAVE_OBJTOOL_NOP_MCOUNT for objtool, as
a means for architectures to enable nop'ing of ftrace locations. Add --mnop
as an option to objtool --mcount, to indicat
_OBJTOOL being enabled and changing annotate_unreachable().
As such, for this series:
Reviewed-by: Naveen N. Rao
Tested-by: Naveen N. Rao
Josh,
Are you ok if this series is taken in through the powerpc tree?
- Naveen
Li Huafei wrote:
# echo 'p cmdline_proc_show' > kprobe_events
# echo 'p cmdline_proc_show+16' >> kprobe_events
I think we should extend multiple_kprobes selftest to also place
contiguous probes to catch such errors.
Yes. But each architecture implementation is different and it looks a
li
Josh Poimboeuf wrote:
On Mon, Oct 10, 2022 at 05:07:46PM +0530, Naveen N. Rao wrote:
> +++ b/scripts/Makefile.lib
> @@ -234,6 +234,7 @@ objtool_args =
\
>$(if $(CONFIG_HAVE_NOINSTR_HACK), --hacks=noinstr) \
Josh Poimboeuf wrote:
On Tue, Oct 11, 2022 at 01:20:02PM -0700, Josh Poimboeuf wrote:
On Mon, Oct 10, 2022 at 05:19:02PM +0530, Naveen N. Rao wrote:
> All the above changes are down to compiler optimizations and shuffling due
> to CONFIG_OBJTOOL being enabled and changing annotate_unrea
This series attempts to address some of the concerns raised in
https://github.com/linuxppc/issues/issues/440
The last two patches are minor cleanups in related kprobes code.
- Naveen
Naveen N. Rao (5):
powerpc/kprobes: Remove preempt disable around call to get_kprobe() in
n]register().
*OR
*- with preemption disabled - from architecture specific code.
*/
As such, there is no need to disable preemption around the call to
get_kprobe(). Drop the same.
Reported-by: Nicholas Piggin
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/kpr
kprobes: Do not disable interrupts for optprobes and
kprobes_on_ftrace").
Reported-by: Nicholas Piggin
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/optprobes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/optprobes.c b/arch/powerpc/kern
do in
optprobes and trap-based kprobes.
- Drop setting orig_gpr3 and result to zero in optprobes. These are not
relevant under kprobes and should not be used by the handlers.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/optprobes_head.S| 5 +
arch/powerpc/kernel/trace
Many of these headers are not necessary since those are included
indirectly, or the code using those headers has been removed.
Signed-off-by: Naveen N. Rao
---
arch/powerpc/kernel/kprobes-ftrace.c | 4
arch/powerpc/kernel/kprobes.c| 2 --
2 files changed, 6 deletions(-)
diff --git
preempt_enable_no_resched() is just the same as preempt_enable() when we
are in a irqs disabled context. kprobe_handler() and the post/fault
handlers are all called with irqs disabled. As such, convert those to
just use preempt_enable().
Reported-by: Nicholas Piggin
Signed-off-by: Naveen N. Rao
On Wed, Nov 22, 2023 at 03:44:07PM +1100, Michael Ellerman wrote:
> Naveen N Rao writes:
> > On Tue, Nov 21, 2023 at 10:54:36AM +1100, Michael Ellerman wrote:
> >> Building with GCC 13 (which has -array-bounds enabled) there are several
> >
> > Thanks, gcc13 indee
kernel stack corruption.
Signed-off-by: Naveen N Rao
---
arch/powerpc/lib/sstep.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index a13f05cfc7db..5766180f5380 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
On Thu, Nov 23, 2023 at 09:17:54AM -0600, Gustavo A. R. Silva wrote:
>
> > > To be honest I don't know how paranoid we want to get, we could end up
> > > putting WARN's all over the kernel :)
> > >
> > > In this case I guess if the size is too large we overflow the buffer on
> > > the kernel stac
ition, the commit missed saving the correct stack pointer in
pt_regs. Update the same.
Fixes: 41a506ef71eb ("powerpc/ftrace: Create a dummy stackframe to fix stack
unwind")
Cc: sta...@vger.kernel.org
Signed-off-by: Naveen N Rao
---
arch/powerpc/kernel/trace/ftrace_entry.S | 4 ++-
On Mon, Oct 16, 2023 at 04:01:45PM +1100, Benjamin Gray wrote:
> patch_instruction() is designed for patching instructions in otherwise
> readonly memory. Other consumers also sometimes need to patch readonly
> memory, so have abused patch_instruction() for arbitrary data patches.
>
> This is a pr
On Mon, Oct 16, 2023 at 04:01:46PM +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
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
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
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
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
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
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
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
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
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
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
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
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
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 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
> >
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 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.
Reviewed-by: Christophe Leroy
Signed-off-by: Naveen N Rao
---
v2: Drop the call to cc-option
-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
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
[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 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
> >
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 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
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 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
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
Sathvika Vasireddy wrote:
arch/powerpc/kvm/booke.o: warning: objtool: kvmppc_fill_pt_regs+0x30:
unannotated intra-function call
As an attempt to fix it, I tried expanding ANNOTATE_INTRA_FUNCTION_CALL
macro to indicate that the branch target is valid. It then threw another
warning (arch/pow
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, 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 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 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
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 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
_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,
> +
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
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
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
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 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
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
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
Christophe Leroy wrote:
Le 20/10/2022 à 19:29, Naveen N. Rao a écrit :
Many of these headers are not necessary since those are included
indirectly, or the code using those headers has been removed.
It is usually not a good idea to not include headers because they are
already included
Nicholas Piggin wrote:
On Fri Oct 21, 2022 at 3:28 AM AEST, Naveen N. Rao wrote:
arch_prepare_kprobe() is called from register_kprobe() via
prepare_kprobe(), or through register_aggr_kprobe(), both with the
kprobe_mutex held. Per the comment for get_kprobe():
/*
* This routine is called
Nicholas Piggin wrote:
On Fri Oct 21, 2022 at 3:29 AM AEST, Naveen N. Rao wrote:
Ensure a more consistent pt_regs across kprobes, optprobes and
KPROBES_ON_FTRACE:
- Drop setting trap to 0x700 under optprobes. This is not accurate and
is unnecessary. Instead, zero it out for both optprobes and
On IBM Power9, perf watchpoint tests fail since no hardware breakpoints
are available. Detect this by checking the error returned by
perf_event_open() and skip the tests in that case.
Reported-by: Disha Goel
Signed-off-by: Naveen N. Rao
---
tools/perf/tests/wp.c | 12 +++-
1 file
issues. The first patch is a small cleanup to aid subsequent
fixes.
- Naveen
Naveen N. Rao (3):
selftests/powerpc: Move perror closer to its use
selftests/powerpc: Bump up rlimit for perf-hwbreak test
selftests/powerpc: Account for offline cpus in perf-hwbreak test
.../selftests/powerpc
Right now, if perf_event_open() fails for the systemwide tests, error
report is printed too late, sometimes after subsequent system calls.
Move use of perror() to the main function, just after the syscall.
Signed-off-by: Naveen N. Rao
---
.../selftests/powerpc/ptrace/perf-hwbreak.c | 21
For systemwide tests, use online cpu mask to only open events on online
cpus. This enables this test to work on systems in lower SMT modes.
Signed-off-by: Naveen N. Rao
---
.../selftests/powerpc/ptrace/perf-hwbreak.c | 45 ---
1 file changed, 39 insertions(+), 6 deletions
The systemwide perf hardware breakpoint test tries to open a perf event
on each cpu. On large systems, we run out of file descriptors and fail
the test. Instead, have the test set the file descriptor limit to an
arbitraty high value.
Reported-by: Rohan Deshpande
Signed-off-by: Naveen N. Rao
Christophe Leroy wrote:
test_bpf tail call tests end up as:
test_bpf: #0 Tail call leaf jited:1 85 PASS
test_bpf: #1 Tail call 2 jited:1 111 PASS
test_bpf: #2 Tail call 3 jited:1 145 PASS
test_bpf: #3 Tail call 4 jited:1 170 PASS
test_bpf: #4 Tail call load/store leaf jited:1 190 PASS
Christophe Leroy wrote:
Le 22/11/2022 à 08:33, Naveen N. Rao a écrit :
Christophe Leroy wrote:
This is a tentative to write above the stack. The problem is encoutered
with tests added by commit 38608ee7b690 ("bpf, tests: Add load store
test case for tail call")
This happens be
Christophe Leroy wrote:
ldimm64 is not only used for loading function addresses, and
That's probably true today, but I worry that that can change upstream
and we may not notice at all.
the NOPs added for padding are impacting performance, so avoid
them when not necessary.
On QEMU mac99, wi
unt preserved across function calls jited:1 140975
PASS
test_bpf: #8 Tail call error path, NULL target jited:1 110 PASS
test_bpf: #9 Tail call error path, index out of range jited:1 69 PASS
test_bpf: test_tail_calls: Summary: 10 PASSED, 0 FAILED, [10/10 JIT'ed]
Suggested-by: Naveen N.
Jinyang He wrote:
在 2022/11/17 21:09, Masami Hiramatsu (Google) 写道:
On Thu, 17 Nov 2022 09:07:37 +0800
Tiezhu Yang wrote:
Hi KPROBES maintainers,
There are some differences of kprobe handler implementations on various
archs, the implementations are almost same on arm64, riscv, csky, the
cod
Christophe Leroy wrote:
Le 24/11/2022 à 11:13, Naveen N. Rao a écrit :
Christophe Leroy wrote:
ldimm64 is not only used for loading function addresses, and
That's probably true today, but I worry that that can change upstream
and we may not notice at all.
Not sure what you mean.
Christophe Leroy wrote:
Le 24/11/2022 à 14:49, Naveen N. Rao a écrit :
Christophe Leroy wrote:
Le 24/11/2022 à 11:13, Naveen N. Rao a écrit :
Christophe Leroy wrote:
In what direction could that change in the future ?
For me if they change that it becomes an API change.
More of an
Sathvika Vasireddy wrote:
On 29/11/22 20:58, Christophe Leroy wrote:
Le 29/11/2022 à 16:13, Sathvika Vasireddy a écrit :
Hi all,
On 25/11/22 09:00, Stephen Rothwell wrote:
Hi all,
After merging the powerpc-objtool tree, today's linux-next build (powerpc
pseries_le_defconfig) produced these
Wang Yufen wrote:
If the vcpu_associativity alloc memory successfully but the
pcpu_associativity fails to alloc memory, the vcpu_associativity
memory leaks.
Fixes: d62c8deeb6e6 ("powerpc/pseries: Provide vcpu dispatch statistics")
Signed-off-by: Wang Yufen
---
arch/powerpc/platforms/pseries/lp
Christophe Leroy wrote:
BPF core calls the jit compiler again for an extra pass in order
to properly set subprog addresses.
Unlike other architectures, powerpc only updates the addresses
during that extra pass. It means that holes must have been left
in the code in order to enable the maximum po
ms/pseries/lpar.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Reviewed-by: Naveen N. Rao
- Naveen
Christophe Leroy wrote:
Le 13/12/2022 à 11:23, Naveen N. Rao a écrit :
Christophe Leroy wrote:
BPF core calls the jit compiler again for an extra pass in order
to properly set subprog addresses.
Unlike other architectures, powerpc only updates the addresses
during that extra pass. It means
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.
>
> There are two ways probed instruction is changed in ma
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 Uprobe on such prefixed instruction as well.
> >
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 Uprobe on su
CONFIG_PPC64, and I don't think we need to confirm if we're running on a
ISA V3.1 for the below check.
With that:
Acked-by: Naveen N. Rao
> +
> + if (ppc_inst_prefixed(auprobe->insn) && (addr & 0x3F) == 0x3C) {
> + pr_info_ratelimited("Cannot register a uprobe on 64 byte
> unaligned prefixed instruction\n");
> + return -EINVAL;
> + }
> +
- Naveen
On 2021/03/01 08:37PM, Segher Boessenkool wrote:
> Hi!
>
> I didn't see this until now, almost a month later, sorry about that :-)
No problem.
>
> On Thu, Feb 04, 2021 at 01:57:53PM +0530, Naveen N. Rao wrote:
> > On 2021/02/03 03:17PM, Segher Boessenkoo
On 2021/03/04 09:45AM, Segher Boessenkool wrote:
> On Wed, Mar 03, 2021 at 10:01:27PM +0530, Naveen N. Rao wrote:
> > On 2021/03/01 08:37PM, Segher Boessenkool wrote:
> > > > And, r6 always ends up with 0xaea. It changes with the value I put into
> > > > r6 tho
On 2021/03/05 12:37PM, Christophe Leroy wrote:
>
>
> Le 04/03/2021 à 03:04, Naveen N. Rao a écrit :
> > 'lis r2,N' is 'addis r2,0,N' and the instruction encoding in the macro
> > LIS_R2 is incorrect (it currently maps to 'addis 0,r2,N'). Fix
e changed, 4 insertions(+), 3 deletions(-)
Thanks,
Acked-by: Naveen N. Rao
- Naveen
user maps a
> > relevant page via mmap(), instruction is replaced via mmap() code
> > 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
> > Acked-
Christophe Leroy wrote:
Le 27/07/2021 à 08:55, Jordan Niethe a écrit :
Implement commit 40272035e1d0 ("powerpc/bpf: Reallocate BPF registers to
volatile registers when possible on PPC32") for PPC64.
When the BPF routine doesn't call any function, the non volatile
registers can be reallocated
Christophe Leroy wrote:
Le 27/06/2019 à 13:23, Naveen N. Rao a écrit :
Since ftrace_replace_code() is a __weak function and can be overridden,
we need to expose the flags that can be set. So, move the flags enum to
the header file.
Reviewed-by: Steven Rostedt (VMware)
Signed-off-by: Naveen
Christophe Leroy wrote:
Le 10/01/2022 à 11:07, Naveen N. Rao a écrit :
kernel test robot reported the below build error with a randconfig:
powerpc64-linux-ld: arch/powerpc/net/bpf_jit_comp64.o:(.toc+0x0):
undefined reference to `powerpc_security_features'
This can happ
401 - 500 of 1372 matches
Mail list logo