[Bug 215389] pagealloc: memory corruption at building glibc-2.33 and running its' testsuite

2022-05-12 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215389 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added Status|NEW |ASSIGNED

[Bug 215389] pagealloc: memory corruption at building glibc-2.33 and running its' testsuite

2022-05-12 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215389 --- Comment #20 from Erhard F. (erhar...@mailbox.org) --- DEBUG_STACKOVERFLOW and KFENCE have been enabled already in the builds I did here (see kernel attached kernel .config here). However if I enable (inline) KASAN the kernel won't boot at

[powerpc:next] BUILD SUCCESS b6b1c3ce06ca438eb24e0f45bf0e63ecad0369f5

2022-05-12 Thread kernel test robot
mpc834x_itx_defconfig x86_64 randconfig-c001-20220509 arm randconfig-c002-20220509 x86_64randconfig-c001 arm randconfig-c002-20220512 ia64 allmodconfig ia64

Re: [PATCH 0/5] Atomics support for eBPF on powerpc

2022-05-12 Thread Daniel Borkmann
On 5/12/22 9:45 AM, Hari Bathini wrote: This patchset adds atomic operations to the eBPF instruction set on powerpc. The instructions that are added here can be summarised with this list of kernel operations for ppc64: * atomic[64]_[fetch_]add * atomic[64]_[fetch_]and * atomic[64]_[fetch_]or *

Re: [PATCH kernel] KVM: PPC: Book3s: Remove real mode interrupt controller hcalls handlers

2022-05-12 Thread kernel test robot
Hi Alexey, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/topic/ppc-kvm] [also build test ERROR on v5.18-rc6 next-20220512] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base

Re: request_module DoS

2022-05-12 Thread Luis Chamberlain
On Thu, May 12, 2022 at 10:07:26PM +1000, Michael Ellerman wrote: > Michael Ellerman writes: > > Luis Chamberlain writes: > ... > > > >> Can someone try this on ppc64le system? At this point I am not convinced > >> this issue is generic. > > > > Does your x86 system have at least 784 CPUs? > > >

Re: [PATCH] powerpc/xive: Fix refcount leak in xive_spapr_init

2022-05-12 Thread Cédric Le Goater
On 5/12/22 11:05, Miaoqian Lin wrote: of_find_compatible_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt

Re: [RFC PATCH 3/3] objtool/mcount: Add powerpc specific functions

2022-05-12 Thread Josh Poimboeuf
On Thu, May 12, 2022 at 02:52:40PM +, Christophe Leroy wrote: > Hi Josh, > > Le 28/03/2022 à 21:59, Josh Poimboeuf a écrit : > > 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

Re: [RFC PATCH 3/3] objtool/mcount: Add powerpc specific functions

2022-05-12 Thread Christophe Leroy
Hi Josh, Le 28/03/2022 à 21:59, Josh Poimboeuf a écrit : > 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 for anything >> else ? > > I'm not

[Bug 215389] pagealloc: memory corruption at building glibc-2.33 and running its' testsuite

2022-05-12 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215389 --- Comment #19 from Christophe Leroy (christophe.le...@csgroup.eu) --- Yes KASAN can bring some additional inputs. Maybe start with CONFIG_KFENCE, it is lighter than KASAN. For the above problem, maybe CONFIG_DEBUG_STACKOVERFLOW can help. --

Re: [PATCH] ASoC: imx-hdmi: Fix refcount leak in imx_hdmi_probe

2022-05-12 Thread Mark Brown
On Wed, 11 May 2022 09:27:40 +0400, Miaoqian Lin wrote: > of_find_device_by_node() takes reference, we should use put_device() > to release it. when devm_kzalloc() fails, it doesn't have a > put_device(), it will cause refcount leak. > Add missing put_device() to fix this. > > Applied to

Re: [PATCH] ASoC: fsl: Fix refcount leak in imx_sgtl5000_probe

2022-05-12 Thread Mark Brown
On Wed, 11 May 2022 10:58:03 +0400, Miaoqian Lin wrote: > of_find_i2c_device_by_node() takes a reference, > In error paths, we should call put_device() to drop > the reference to aviod refount leak. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

[PATCH v2] bug: Use normal relative pointers in 'struct bug_entry'

2022-05-12 Thread Josh Poimboeuf
With CONFIG_GENERIC_BUG_RELATIVE_POINTERS, the addr/file relative pointers are calculated weirdly: based on the beginning of the bug_entry struct address, rather than their respective pointer addresses. Make the relative pointers less surprising to both humans and tools by calculating them the

[powerpc] kernel BUG at mm/mmap.c:3233! with ltp/mmapstress03

2022-05-12 Thread Sachin Sant
While running LTP test mmapstress03 on a Power10 LPAR running 5.18.0-rc6-next-20220512 following kernel bug was seen [ 944.492475] mmap: mmapstress03 (1919217): VmData 18446744073706799104 exceed data ulimit 18446744073709551615. Update limits or use boot option ignore_rlimit_data

Re: [PATCH -next] powerpc: add support for syscall stack randomization

2022-05-12 Thread Michael Ellerman
xiujianfeng writes: > 在 2022/5/10 17:23, Nicholas Piggin 写道: >> Excerpts from Xiu Jianfeng's message of May 5, 2022 9:19 pm: >>> Add support for adding a random offset to the stack while handling >>> syscalls. This patch uses mftb() instead of get_random_int() for better >>> performance. >> ...

Re: [PATCH -next] powerpc: add support for syscall stack randomization

2022-05-12 Thread Michael Ellerman
Kees Cook writes: > On Tue, May 10, 2022 at 07:23:46PM +1000, Nicholas Piggin wrote: ... >> >> I wonder why the choose is separated from the add? I guess it's to >> avoid a data dependency for stack access on an expensive random >> function, so that makes sense (a comment would be nice in the >>

[PATCH] powerpc/fsl_rio: Fix refcount leak in fsl_rio_setup

2022-05-12 Thread Miaoqian Lin
of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes: abc3aeae3aaa ("fsl-rio: Add two ports and rapidio message units support") Signed-off-by: Miaoqian Lin ---

Re: request_module DoS

2022-05-12 Thread Michael Ellerman
Michael Ellerman writes: > Luis Chamberlain writes: ... > >> Can someone try this on ppc64le system? At this point I am not convinced >> this issue is generic. > > Does your x86 system have at least 784 CPUs? > > I don't know where the original report came from, but the trace shows > "CPU 784",

Re: [PATCH V2] tools/perf/tests: Skip perf BPF test if clang is not present

2022-05-12 Thread kajoljain
On 5/11/22 17:24, Athira Rajeev wrote: > Perf BPF filter test fails in environment where "clang" > is not installed. > > Test failure logs: > > <<>> > 42: BPF filter: > 42.1: Basic BPF filtering : Skip > 42.2: BPF pinning : FAILED! > 42.3: BPF

Re: [PATCH V2] tools/perf/tests: Fix session topology test to skip the test in guest environment

2022-05-12 Thread kajoljain
On 5/11/22 17:19, Athira Rajeev wrote: > The session topology test fails in powerpc pSeries platform. > Test logs: > <<>> > Session topology : FAILED! > <<>> > > This testcases tests cpu topology by checking the core_id and > socket_id stored in perf_env from perf session. The data from > perf

[PATCH] powerpc/xive: Fix refcount leak in xive_spapr_init

2022-05-12 Thread Miaoqian Lin
of_find_compatible_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak. Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller") Signed-off-by: Miaoqian Lin ---

[PATCH 5/5] bpf ppc32: Add instructions for atomic_[cmp]xchg

2022-05-12 Thread Hari Bathini
This adds two atomic opcodes BPF_XCHG and BPF_CMPXCHG on ppc32, both of which include the BPF_FETCH flag. The kernel's atomic_cmpxchg operation fundamentally has 3 operands, but we only have two register fields. Therefore the operand we compare against (the kernel's API calls it 'old') is

[PATCH 4/5] bpf ppc32: add support for BPF_ATOMIC bitwise operations

2022-05-12 Thread Hari Bathini
Adding instructions for ppc32 for atomic_and atomic_or atomic_xor atomic_fetch_add atomic_fetch_and atomic_fetch_or atomic_fetch_xor Signed-off-by: Hari Bathini --- arch/powerpc/net/bpf_jit_comp32.c | 45 +-- 1 file changed, 31 insertions(+), 14 deletions(-) diff

[PATCH 3/5] bpf ppc64: Add instructions for atomic_[cmp]xchg

2022-05-12 Thread Hari Bathini
This adds two atomic opcodes BPF_XCHG and BPF_CMPXCHG on ppc64, both of which include the BPF_FETCH flag. The kernel's atomic_cmpxchg operation fundamentally has 3 operands, but we only have two register fields. Therefore the operand we compare against (the kernel's API calls it 'old') is

[PATCH 2/5] bpf ppc64: add support for atomic fetch operations

2022-05-12 Thread Hari Bathini
Adding instructions for ppc64 for atomic[64]_fetch_add atomic[64]_fetch_and atomic[64]_fetch_or atomic[64]_fetch_xor Signed-off-by: Hari Bathini --- arch/powerpc/net/bpf_jit_comp64.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git

[PATCH 1/5] bpf ppc64: add support for BPF_ATOMIC bitwise operations

2022-05-12 Thread Hari Bathini
Adding instructions for ppc64 for atomic[64]_and atomic[64]_or atomic[64]_xor Signed-off-by: Hari Bathini --- arch/powerpc/net/bpf_jit_comp64.c | 57 --- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/arch/powerpc/net/bpf_jit_comp64.c

[PATCH 0/5] Atomics support for eBPF on powerpc

2022-05-12 Thread Hari Bathini
This patchset adds atomic operations to the eBPF instruction set on powerpc. The instructions that are added here can be summarised with this list of kernel operations for ppc64: * atomic[64]_[fetch_]add * atomic[64]_[fetch_]and * atomic[64]_[fetch_]or * atomic[64]_[fetch_]xor * atomic[64]_xchg *

Re: request_module DoS

2022-05-12 Thread Michael Ellerman
Luis Chamberlain writes: > On Mon, May 09, 2022 at 09:13:03AM -0700, Luis Chamberlain wrote: >> On Mon, May 09, 2022 at 09:23:39PM +1000, Michael Ellerman wrote: >> > Herbert Xu writes: >> > > Hi: >> > > >> > > There are some code paths in the kernel where you can reliably >> > > trigger a