[PATCH] powerpc/64: Drop ppc_inst_as_str()

2022-05-30 Thread Michael Ellerman
The ppc_inst_as_str() macro tries to make printing variable length, aka "prefixed", instructions convenient. It mostly succeeds, but it does hide an on-stack buffer, which triggers stack protector. More problematically it doesn't compile at all with GCC 12, due to the fact that it returns the char

Re: [PATCH] powerpc/irq: Increase stack_overflow detection limit when KASAN is enabled

2022-05-30 Thread Christophe Leroy
Le 31/05/2022 à 08:21, Michael Ellerman a écrit : > Christophe Leroy writes: >> When KASAN is enabled, as shown by the Oops below, the 2k limit is not >> enough to allow stack dump after a stack overflow detection when >> CONFIG_DEBUG_STACKOVERFLOW is selected: >> >> do_IRQ: stack overflow:

Re: [PATCH] powerpc/Kconfig: Force THREAD_SHIFT to at least 14 with KASAN

2022-05-30 Thread Christophe Leroy
Le 31/05/2022 à 08:16, Michael Ellerman a écrit : > Christophe Leroy writes: >> Allthough 14 is the default THREAD_SHIFT when KASAN is selected, >> taking an old config may keep 13 when CONFIG_EXPERT is selected. >> >> Force it to 14 as a minimum when KASAN is selected. >> >> Also default to 15

Re: [PATCH v1 0/4] Kill the time spent in patch_instruction()

2022-05-30 Thread Christophe Leroy
Le 17/05/2022 à 14:37, Michael Ellerman a écrit : > Christophe Leroy writes: >> Le 15/05/2022 à 12:28, Michael Ellerman a écrit : >>> On Tue, 22 Mar 2022 16:40:17 +0100, Christophe Leroy wrote: This series reduces by 70% the time required to activate ftrace on an 8xx with CONFIG_STRICT

Re: [PATCH] powerpc/irq: Increase stack_overflow detection limit when KASAN is enabled

2022-05-30 Thread Michael Ellerman
Christophe Leroy writes: > When KASAN is enabled, as shown by the Oops below, the 2k limit is not > enough to allow stack dump after a stack overflow detection when > CONFIG_DEBUG_STACKOVERFLOW is selected: > > do_IRQ: stack overflow: 1984 > CPU: 0 PID: 126 Comm: systemd-udevd Not tain

Re: [RFC PATCH 4/4] objtool/powerpc: Add --mcount specific implementation

2022-05-30 Thread Christophe Leroy
Le 25/05/2022 à 19:27, Christophe Leroy a écrit : Le 24/05/2022 à 15:33, Christophe Leroy a écrit : Le 24/05/2022 à 13:00, Sathvika Vasireddy a écrit : +{ +    switch (elf->ehdr.e_machine) { +    case EM_X86_64: +    return R_X86_64_64; +    case EM_PPC64: +    return R

Re: [PATCH] powerpc/Kconfig: Force THREAD_SHIFT to at least 14 with KASAN

2022-05-30 Thread Michael Ellerman
Christophe Leroy writes: > Allthough 14 is the default THREAD_SHIFT when KASAN is selected, > taking an old config may keep 13 when CONFIG_EXPERT is selected. > > Force it to 14 as a minimum when KASAN is selected. > > Also default to 15 when KASAN on PPC64. > > Reported-by: Erhard Furtner > Sign

Fwd: [PATCH 0/4] objtool: Reorganize x86 arch-specific code

2022-05-30 Thread Christophe Leroy
All available at https://lore.kernel.org/lkml/20220531020744.236970-1-chenzhong...@huawei.com/T/#t Chen, can you please copy linuxppc-dev list next time, as powerpc is interested in objtool. Message transféré Sujet : [PATCH 0/4] objtool: Reorganize x86 arch-specific code Date

Re: [PATCH] RISC-V: Prepare dropping week attribute from arch_kexec_apply_relocations[_add]

2022-05-30 Thread Uwe Kleine-König
On Mon, May 30, 2022 at 04:11:27PM -0700, Palmer Dabbelt wrote: > On Mon, 30 May 2022 12:41:33 PDT (-0700), u.kleine-koe...@pengutronix.de > wrote: > > Hello, > > > > On Mon, May 30, 2022 at 11:58:16AM -0700, Palmer Dabbelt wrote: > > > On Mon, 30 May 2022 00:42:02 PDT (-0700), u.kleine-koe...@pe

Re: [PATCH v2] of: check previous kernel's ima-kexec-buffer against memory bounds

2022-05-30 Thread Vaibhav Jain
Thanks for looking into this patch Rob, I have addressed your review comment in v3 of the patch posted at https://lore.kernel.org/all/20220531041446.3334259-1-vaib...@linux.ibm.com/ -- Cheers ~ Vaibhav

[PATCH v3] of: check previous kernel's ima-kexec-buffer against memory bounds

2022-05-30 Thread Vaibhav Jain
Presently ima_get_kexec_buffer() doesn't check if the previous kernel's ima-kexec-buffer lies outside the addressable memory range. This can result in a kernel panic if the new kernel is booted with 'mem=X' arg and the ima-kexec-buffer was allocated beyond that range by the previous kernel. The pan

[PATCH 08/10] scsi/ibmvfc: Replace tasklet with work

2022-05-30 Thread Davidlohr Bueso
Tasklets have long been deprecated as being too heavy on the system by running in irq context - and this is not a performance critical path. If a higher priority process wants to run, it must wait for the tasklet to finish before doing so. Use a workqueue instead and run in task context - albeit th

[PATCH 06/10] scsi/ibmvscsi_tgt: Replace work tasklet with threaded irq

2022-05-30 Thread Davidlohr Bueso
Tasklets have long been deprecated as being too heavy on the system by running in irq context - and this is not a performance critical path. If a higher priority process wants to run, it must wait for the tasklet to finish before doing so. A more suitable equivalent is to converted to threaded irq

[PATCH 09/10] scsi/ibmvscsi: Replace srp tasklet with work

2022-05-30 Thread Davidlohr Bueso
Tasklets have long been deprecated as being too heavy on the system by running in irq context - and this is not a performance critical path. If a higher priority process wants to run, it must wait for the tasklet to finish before doing so. Process srps asynchronously in process context in a dedica

Re: [PATCH] RISC-V: Prepare dropping week attribute from arch_kexec_apply_relocations[_add]

2022-05-30 Thread Palmer Dabbelt
On Mon, 30 May 2022 12:41:33 PDT (-0700), u.kleine-koe...@pengutronix.de wrote: Hello, On Mon, May 30, 2022 at 11:58:16AM -0700, Palmer Dabbelt wrote: On Mon, 30 May 2022 00:42:02 PDT (-0700), u.kleine-koe...@pengutronix.de wrote: > Without this change arch/riscv/kernel/elf_kexec.c fails to com

Re: [PATCH] RISC-V: Prepare dropping week attribute from arch_kexec_apply_relocations[_add]

2022-05-30 Thread Palmer Dabbelt
On Mon, 30 May 2022 00:42:02 PDT (-0700), u.kleine-koe...@pengutronix.de wrote: Without this change arch/riscv/kernel/elf_kexec.c fails to compile once commit 233c1e6c319c ("kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]") is also contained in the tree. This currently hap

[PATCH v5] mm: Avoid unnecessary page fault retires on shared memory types

2022-05-30 Thread Peter Xu
.net>, Brian Cain , Michal Simek , Thomas Bogendoerfer , linux-par...@vger.kernel.org, linux-m...@vger.kernel.org, Dinh Nguyen , linux-ri...@lists.infradead.org, Palmer Dabbelt , Sven Schnelle , Guo Ren , linux-hexa...@vger.kernel.org, Ivan Kokshaysky , Johannes Berg , linuxppc-dev@lists.ozla

Re: [PATCH v4] mm: Avoid unnecessary page fault retires on shared memory types

2022-05-30 Thread Christian Borntraeger
, Thomas Bogendoerfer , linux-par...@vger.kernel.org, Max Filippov , linux-ker...@vger.kernel.org, Johannes Berg , Dinh Nguyen , linux-ri...@lists.infradead.org, Palmer Dabbelt , Sven Schnelle , linux-al...@vger.kernel.org, Ivan Kokshaysky , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "Davi

Re: [PATCH v4] mm: Avoid unnecessary page fault retires on shared memory types

2022-05-30 Thread Peter Xu
r...@linux.ibm.com>, linux-par...@vger.kernel.org, Max Filippov , linux-ker...@vger.kernel.org, Johannes Berg , Dinh Nguyen , linux-ri...@lists.infradead.org, Palmer Dabbelt , Sven Schnelle , linux-al...@vger.kernel.org, Ivan Kokshaysky , Andrew Morton , Thomas Bogendoerfer , linuxppc-dev@lis

Re: [PATCH v4] mm: Avoid unnecessary page fault retires on shared memory types

2022-05-30 Thread Heiko Carstens
r...@linux.ibm.com>, linux-par...@vger.kernel.org, Max Filippov , linux-ker...@vger.kernel.org, Johannes Berg , Dinh Nguyen , linux-ri...@lists.infradead.org, Palmer Dabbelt , Sven Schnelle , linux-al...@vger.kernel.org, Ivan Kokshaysky , Andrew Morton , Thomas Bogendoerfer , linuxppc-dev@lis

Re: [PATCH v4] mm: Avoid unnecessary page fault retires on shared memory types

2022-05-30 Thread Peter Xu
>, Thomas Bogendoerfer , >linux-par...@vger.kernel.org, Max Filippov , >linux-ker...@vger.kernel.org, Johannes Berg , Dinh >Nguyen , linux-ri...@lists.infradead.org, Palmer Dabbelt >, Sven Schnelle , >linux-al...@vger.kernel.org, Ivan Kokshaysky , >Andrew Morton , linuxppc-dev@lists.ozlabs.or

Re: [PATCH v4] mm: Avoid unnecessary page fault retires on shared memory types

2022-05-30 Thread Peter Xu
>, Thomas Bogendoerfer , >linux-par...@vger.kernel.org, Max Filippov , >linux-ker...@vger.kernel.org, Johannes Berg , Dinh >Nguyen , linux-ri...@lists.infradead.org, Palmer Dabbelt >, Sven Schnelle , >linux-al...@vger.kernel.org, Ivan Kokshaysky , >Andrew Morton , linuxppc-dev@lists.ozlabs.or

Re: [PATCH v4] mm: Avoid unnecessary page fault retires on shared memory types

2022-05-30 Thread Catalin Marinas
onstr.eu>, Thomas Bogendoerfer , linux-par...@vger.kernel.org, Max Filippov , linux-ker...@vger.kernel.org, Johannes Berg , Dinh Nguyen , linux-ri...@lists.infradead.org, Palmer Dabbelt , Sven Schnelle , linux-al...@vger.kernel.org, Ivan Kokshaysky , Andrew Morton , linuxppc-dev@lists.ozlabs.

Re: [PATCH v4] mm: Avoid unnecessary page fault retires on shared memory types

2022-05-30 Thread Christian Borntraeger
ha.franken.de>, linux-par...@vger.kernel.org, Max Filippov , linux-ker...@vger.kernel.org, Johannes Berg , Dinh Nguyen , linux-ri...@lists.infradead.org, Palmer Dabbelt , Sven Schnelle , linux-al...@vger.kernel.org, Ivan Kokshaysky , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S . Mi

Re: [PATCH v4] mm: Avoid unnecessary page fault retires on shared memory types

2022-05-30 Thread Heiko Carstens
on...@monstr.eu>, Thomas Bogendoerfer , linux-par...@vger.kernel.org, Max Filippov , linux-ker...@vger.kernel.org, Johannes Berg , Dinh Nguyen , linux-ri...@lists.infradead.org, Palmer Dabbelt , Sven Schnelle , linux-al...@vger.kernel.org, Ivan Kokshaysky , Andrew Morton , linuxppc-dev@lists.

[PATCH] KVM: PPC: Book3S HV Nested: clean up warnings found by checkpatch

2022-05-30 Thread XueBing Chen
Clean up a handful of checkpatch warnings: - WARNING: Prefer 'long' over 'long int' as the int is unnecessary - WARNING: Missing a blank line after declarations - WARNING: Prefer 'unsigned int *' to bare use of 'unsigned *' - WARNING: unnecessary whitespace before a quoted newline - WARNING: pleas

Re: [PATCH] RISC-V: Prepare dropping week attribute from arch_kexec_apply_relocations[_add]

2022-05-30 Thread Uwe Kleine-König
Hello, On Mon, May 30, 2022 at 11:58:16AM -0700, Palmer Dabbelt wrote: > On Mon, 30 May 2022 00:42:02 PDT (-0700), u.kleine-koe...@pengutronix.de > wrote: > > Without this change arch/riscv/kernel/elf_kexec.c fails to compile once > > commit 233c1e6c319c ("kexec_file: drop weak attribute from > >

[PATCH] powerpc/irq: Increase stack_overflow detection limit when KASAN is enabled

2022-05-30 Thread Christophe Leroy
When KASAN is enabled, as shown by the Oops below, the 2k limit is not enough to allow stack dump after a stack overflow detection when CONFIG_DEBUG_STACKOVERFLOW is selected: do_IRQ: stack overflow: 1984 CPU: 0 PID: 126 Comm: systemd-udevd Not tainted 5.18.0-gentoo-PMacG4 #1

[PATCH] powerpc/Kconfig: Force THREAD_SHIFT to at least 14 with KASAN

2022-05-30 Thread Christophe Leroy
Allthough 14 is the default THREAD_SHIFT when KASAN is selected, taking an old config may keep 13 when CONFIG_EXPERT is selected. Force it to 14 as a minimum when KASAN is selected. Also default to 15 when KASAN on PPC64. Reported-by: Erhard Furtner Signed-off-by: Christophe Leroy --- arch/po

Re: [PATCH v7 21/25] Kbuild: add Rust support

2022-05-30 Thread Miguel Ojeda
On Thu, May 26, 2022 at 12:25 AM Nick Desaulniers wrote: > > Is there a reason to not just turn clippy on always? Might be nicer to > start off with good practices by default. :^) The idea crossed my mind too [1], but sadly Clippy disables some optimizations and in general is not intended to be u

Re: dangling pointer to '__str' error on ppc64_defconfig, GCC 12.1.0

2022-05-30 Thread Michael Ellerman
Petr Mladek writes: > On Thu 2022-05-26 16:17:15, Bagas Sanjaya wrote: >> Hi everyone, >> >> Attempting to build ppc64_defconfig kernel with powerpc64-unknown-linux-gnu >> (GCC 12.1.0) on v5.18, I got build error on ftrace.o: >> >> CC arch/powerpc/kernel/trace/ftrace.o >> CC init/i

[PATCH] RISC-V: Prepare dropping week attribute from arch_kexec_apply_relocations[_add]

2022-05-30 Thread Uwe Kleine-König
Without this change arch/riscv/kernel/elf_kexec.c fails to compile once commit 233c1e6c319c ("kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]") is also contained in the tree. This currently happens in next-20220527. Prepare the RISC-V similar to the s390 adaption done in 23