[PowerPC][Linux-next][6.11.0-rc4-next-20240820] OOPs while running LTP FS Stress

2024-09-15 Thread Venkat Rao Bagalkote
Greetings!!! I am seeing below kernel crash from 6.11.0-rc4-next-20240820. Tried to do git bisect, but it didnt point to right patch. Attached is the bisect log. Any help in fixing this is much appriciated. [ 1246.652547] WARNING: CPU: 0 PID: 45927 at kernel/sched/fair.c:6049 unthrottle_

Re: [PATCH net-next v2] page_pool: fix build on powerpc with GCC 14

2024-09-15 Thread Stephen Rothwell
Hi all, On Sat, 14 Sep 2024 12:02:09 +1000 Michael Ellerman wrote: > > Mina Almasry writes: > > Building net-next with powerpc with GCC 14 compiler results in this > > build error: > > > > /home/sfr/next/tmp/ccuSzwiR.s: Assembler messages: > > /home/sfr/next/tmp/ccuSzwiR.s:2579: Error: operand o

[PATCH v5 17/17] powerpc64/bpf: Add support for bpf trampolines

2024-09-15 Thread Hari Bathini
From: Naveen N Rao Add support for bpf_arch_text_poke() and arch_prepare_bpf_trampoline() for 64-bit powerpc. While the code is generic, BPF trampolines are only enabled on 64-bit powerpc. 32-bit powerpc will need testing and some updates. BPF Trampolines adhere to the existing ftrace ABI utiliz

[PATCH v5 16/17] samples/ftrace: Add support for ftrace direct samples on powerpc

2024-09-15 Thread Hari Bathini
From: Naveen N Rao 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/power

[PATCH v5 15/17] powerpc/ftrace: Add support for DYNAMIC_FTRACE_WITH_DIRECT_CALLS

2024-09-15 Thread Hari Bathini
From: Naveen N Rao Add support for DYNAMIC_FTRACE_WITH_DIRECT_CALLS similar to the arm64 implementation. ftrace direct calls allow custom trampolines to be called into directly from function ftrace call sites, bypassing the ftrace trampoline completely. This functionality is currently utilized b

[PATCH v5 14/17] powerpc/ftrace: Add support for DYNAMIC_FTRACE_WITH_CALL_OPS

2024-09-15 Thread Hari Bathini
From: Naveen N Rao Implement support for DYNAMIC_FTRACE_WITH_CALL_OPS similar to the arm64 implementation. This works by patching-in a pointer to an associated ftrace_ops structure before each traceable function. If multiple ftrace_ops are associated with a call site, then a special ftrace_list_

[PATCH v5 12/17] powerpc64/ftrace: Move ftrace sequence out of line

2024-09-15 Thread Hari Bathini
From: Naveen N Rao Function profile sequence on powerpc includes two instructions at the beginning of each function: mflrr0 bl ftrace_caller The call to ftrace_caller() gets nop'ed out during kernel boot and is patched in when ftrace is enabled. Given the sequence, we c

[PATCH v5 13/17] powerpc64/ftrace: Support .text larger than 32MB with out-of-line stubs

2024-09-15 Thread Hari Bathini
From: Naveen N Rao We are restricted to a .text size of ~32MB when using out-of-line function profile sequence. Allow this to be extended up to the previous limit of ~64MB by reserving space in the middle of .text. A new config option CONFIG_PPC_FTRACE_OUT_OF_LINE_NUM_RESERVE is introduced to sp

[PATCH v5 11/17] kbuild: Add generic hook for architectures to use before the final vmlinux link

2024-09-15 Thread Hari Bathini
From: Naveen N Rao 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 in Makefile.vmlinux that architectures can use for this purpose. Architectures need to select CONFIG_ARCH_WANTS_PRE_LINK_VMLINUX and mu

[PATCH v5 10/17] powerpc/ftrace: Add a postlink script to validate function tracer

2024-09-15 Thread Hari Bathini
From: Naveen N Rao Function tracer on powerpc can only work with vmlinux having a .text size of up to ~64MB due to powerpc branch instruction having a limited relative branch range of 32MB. Today, this is only detected on kernel boot when ftrace is init'ed. Add a post-link script to check the siz

[PATCH v5 08/17] powerpc/ftrace: Move ftrace stub used for init text before _einittext

2024-09-15 Thread Hari Bathini
From: Naveen N Rao 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,

[PATCH v5 09/17] powerpc64/bpf: Fold bpf_jit_emit_func_call_hlp() into bpf_jit_emit_func_call_rel()

2024-09-15 Thread Hari Bathini
From: Naveen N Rao Commit 61688a82e047 ("powerpc/bpf: enable kfunc call") enhanced bpf_jit_emit_func_call_hlp() to handle calls out to module region, where bpf progs are generated. The only difference now between bpf_jit_emit_func_call_hlp() and bpf_jit_emit_func_call_rel() is in handling of the

[PATCH v5 07/17] powerpc/ftrace: Skip instruction patching if the instructions are the same

2024-09-15 Thread Hari Bathini
From: Naveen N Rao 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 ---

[PATCH v5 06/17] powerpc/ftrace: Remove pointer to struct module from dyn_arch_ftrace

2024-09-15 Thread Hari Bathini
From: Naveen N Rao Pointer to struct module is only relevant for ftrace records belonging to kernel modules. Having this field in dyn_arch_ftrace wastes memory for all ftrace records belonging to the kernel. Remove the same in favour of looking up the module from the ftrace record address, simila

[PATCH v5 05/17] powerpc/module_64: Convert #ifdef to IS_ENABLED()

2024-09-15 Thread Hari Bathini
From: Naveen N Rao 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/k

[PATCH v5 04/17] powerpc32/ftrace: Unify 32-bit and 64-bit ftrace entry code

2024-09-15 Thread Hari Bathini
From: Naveen N Rao On 32-bit powerpc, gcc generates a three instruction sequence for function profiling: mflrr0 stw r0, 4(r1) bl _mcount On kernel boot, the call to _mcount() is nop-ed out, to be patched back in when ftrace is actually enabled. The 'stw' inst

[PATCH v5 02/17] powerpc/kprobes: Use ftrace to determine if a probe is at function entry

2024-09-15 Thread Hari Bathini
From: Naveen N Rao Rather than hard-coding the offset into a function to be used to determine if a kprobe is at function entry, use ftrace_location() to determine the ftrace location within the function and categorize all instructions till that offset to be function entry. For functions that can

[PATCH v5 03/17] powerpc64/ftrace: Nop out additional 'std' instruction emitted by gcc v5.x

2024-09-15 Thread Hari Bathini
From: Naveen N Rao Gcc v5.x emits a 3-instruction sequence for -mprofile-kernel: mflrr0 std r0, 16(r1) bl _mcount Gcc v6.x moved to a simpler 2-instruction sequence by removing the 'std' instruction. The store saved the return address in the LR save area in t

[PATCH v5 00/17] powerpc: Core ftrace rework, support for ftrace direct and bpf trampolines

2024-09-15 Thread Hari Bathini
This is v5 of the series posted here: https://lore.kernel.org/all/cover.1720942106.git.nav...@kernel.org/ This series reworks core ftrace support on powerpc to have the function profiling sequence moved out of line. This enables us to have a single nop at kernel function entry virtually eliminatin

[PATCH v5 01/17] powerpc/trace: Account for -fpatchable-function-entry support by toolchain

2024-09-15 Thread Hari Bathini
From: Naveen N Rao So far, we have relied on the fact that gcc supports both -mprofile-kernel, as well as -fpatchable-function-entry, and clang supports neither. Our Makefile only checks for CONFIG_MPROFILE_KERNEL to decide which files to build. Clang has a feature request out [*] to implement -f

Re: [PATCH net-next] net: ethernet: fs_enet: Make the per clock optional

2024-09-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Sat, 14 Sep 2024 10:18:20 +0200 you wrote: > Some platforms that use fs_enet don't have the PER register clock. This > optional dependency on the clock was incorrectly made mandatory when > switching to devm_ acces

Re: [PATCH v3 7/8] execmem: add support for cache of large ROX pages

2024-09-15 Thread Mike Rapoport
Hi Ard, On Fri, Sep 13, 2024 at 05:00:42PM +0200, Ard Biesheuvel wrote: > Hi Mike, > > On Mon, 9 Sept 2024 at 08:51, Mike Rapoport wrote: ... > > +static void execmem_fill_trapping_insns(void *ptr, size_t size, bool > > writable) > > +{ > > + if (execmem_info->fill_trapping_insns) > > +

Re: [PATCH net-next v2] page_pool: fix build on powerpc with GCC 14

2024-09-15 Thread Michael Ellerman
Christophe Leroy writes: > Le 14/09/2024 à 04:02, Michael Ellerman a écrit : ... >> >> diff --git a/arch/powerpc/include/asm/atomic.h >> b/arch/powerpc/include/asm/atomic.h >> index 5bf6a4d49268..0e41c1da82dd 100644 >> --- a/arch/powerpc/include/asm/atomic.h >> +++ b/arch/powerpc/include/asm/ato

Re: [PATCH net-next v1] mm: fix build on powerpc with GCC 14

2024-09-15 Thread Matthew Wilcox
On Sat, Sep 14, 2024 at 08:50:46AM +0200, Christophe Leroy wrote: > Hi, > > Le 13/09/2024 à 21:22, Matthew Wilcox a écrit : > > On Fri, Sep 13, 2024 at 07:20:36PM +, Mina Almasry wrote: > > > +++ b/include/linux/page-flags.h > > > @@ -239,8 +239,8 @@ static inline unsigned long _compound_head(

Re: [PATCH v14 05/19] function_graph: Pass ftrace_regs to retfunc

2024-09-15 Thread Steven Rostedt
Can I get an Acked-by from the POWERPC maintainers for this patch? Thanks! -- Steve [ Note this is modifies the return side ] On Fri, 13 Sep 2024 00:09:02 +0900 "Masami Hiramatsu (Google)" wrote: > From: Masami Hiramatsu (Google) > > Pass ftrace_regs to the fgraph_ops::retfunc(). If ftrac

Re: [PATCH v14 03/19] function_graph: Pass ftrace_regs to entryfunc

2024-09-15 Thread Steven Rostedt
Can I get an Acked-by from the POWERPC maintainers for this patch? Thanks! -- Steve On Fri, 13 Sep 2024 00:08:40 +0900 "Masami Hiramatsu (Google)" wrote: > From: Masami Hiramatsu (Google) > > Pass ftrace_regs to the fgraph_ops::entryfunc(). If ftrace_regs is not > available, it passes a N