[PATCH v2 10/16] objtool: Use target file class size instead of a compiled constant

2022-08-28 Thread Sathvika Vasireddy
From: Christophe Leroy In order to allow using objtool on cross-built kernels, determine size of long from elf data instead of using sizeof(long) at build time. For the time being this covers only mcount. Signed-off-by: Christophe Leroy --- tools/objtool/check.c | 16

[PATCH v2 09/16] objtool: Use target file endianness instead of a compiled constant

2022-08-28 Thread Sathvika Vasireddy
From: Christophe Leroy Some architectures like powerpc support both endianness, it's therefore not possible to fix the endianness via arch/endianness.h because there is no easy way to get the target endianness at build time. Use the endianness recorded in the file objtool is working on.

[PATCH v2 08/16] objtool: Fix SEGFAULT

2022-08-28 Thread Sathvika Vasireddy
From: Christophe Leroy find_insn() will return NULL in case of failure. Check insn in order to avoid a kernel Oops for NULL pointer dereference. Signed-off-by: Christophe Leroy --- tools/objtool/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/objtool/check.c

[PATCH v2 07/16] powerpc: Skip objtool from running on VDSO files

2022-08-28 Thread Sathvika Vasireddy
Do not run objtool on VDSO files, by using OBJECT_FILES_NON_STANDARD Suggested-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- arch/powerpc/kernel/vdso/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kernel/vdso/Makefile

[PATCH v2 06/16] powerpc: Fix objtool unannotated intra-function call warnings on PPC32

2022-08-28 Thread Sathvika Vasireddy
From: Christophe Leroy Fix several annotations in assembly files on PPC32. Signed-off-by: Christophe Leroy [Sathvika Vasireddy: Changed subject line from objtool/powerpc: Activate objtool on PPC32 to powerpc: Fix objtool unannotated intra-function call warnings on PPC32, and removed Kconfig

[PATCH v2 05/16] powerpc: Skip objtool from running on drivers/crypto/vmx/aesp8-ppc.o

2022-08-28 Thread Sathvika Vasireddy
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-ppc.o: warning: objtool: .text+0x2448: unannotated intra-function call

[PATCH v2 04/16] powerpc: Curb objtool unannotated intra-function warnings

2022-08-28 Thread Sathvika Vasireddy
objtool throws the following unannotated intra-function call warnings: arch/powerpc/kernel/entry_64.o: warning: objtool: .text+0x4: unannotated intra-function call arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xe64: unannotated intra-function call

[PATCH v2 03/16] powerpc: Fix objtool unannotated intra-function call warnings

2022-08-28 Thread Sathvika Vasireddy
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 intra-function call

[PATCH v2 01/16] powerpc: Replace unreachable() with it's builtin variant in __WARN_FLAGS()

2022-08-28 Thread Sathvika Vasireddy
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(). This annotation is adding a call to a function with size 0, and objtool does not

[PATCH v2 00/16] objtool: Enable and implement --mcount option on powerpc

2022-08-28 Thread Sathvika Vasireddy
This patchset enables and implements objtool --mcount option on powerpc. This applies atop powerpc/merge branch. Changelog: v2: * Change subject of patch 01/16 * As suggested by Christophe Leroy, add barrier_before_unreachable() before __builtin_unreachable() to work around a gcc problem. * Fix

[PATCH v2 02/16] powerpc: override __ALIGN() and __ALIGN_STR() macros

2022-08-28 Thread Sathvika Vasireddy
Powerpc instructions must be word-aligned. Currently, there is an alignment of 16 bytes (by default), and it is much more than what is required for powerpc (4 bytes). The default expansion of __ALIGN() macro is: #define __ALIGN .align 4,0x90 Since Powerpc Linux does not require a 16 byte

Re: [PATCH 01/16] powerpc: Replace unreachable() with it's builtin variant in WARN_ON()

2022-08-28 Thread Sathvika Vasireddy
Hi Christophe, On 26/08/22 15:48, Christophe Leroy wrote: Le 08/08/2022 à 13:48, Sathvika Vasireddy a écrit : objtool is throwing *unannotated intra-function call* warnings with a few instructions that are marked unreachable. Replace unreachable() with __builtin_unreachable() to fix these

RE: [PATCH v2 00/10] crypto: Kconfig - simplify menus and help text

2022-08-28 Thread Elliott, Robert (Servers)
> -Original Message- > From: Christophe Leroy > Sent: Sunday, August 28, 2022 2:33 AM > To: Elliott, Robert (Servers) ; Nayna > ; Andrew Donnellan > Cc: linuxppc-dev@lists.ozlabs.org > Subject: Re: [PATCH v2 00/10] crypto: Kconfig - simplify menus and help > text > > Hi, > > Le

[Bug 215622] WARNING: possible irq lock inversion dependency detected

2022-08-28 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215622 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Status|NEW |RESOLVED

Re: [PATCH v3] powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImage

2022-08-28 Thread Christophe Leroy
Le 28/08/2022 à 19:41, Pali Rohár a écrit : > On Sunday 28 August 2022 17:39:25 Christophe Leroy wrote: >> Le 28/08/2022 à 19:33, Christophe Leroy a écrit : >>> >>> >>> Le 28/08/2022 à 11:56, Pali Rohár a écrit : When CONFIG_TARGET_CPU is specified then pass its value to the compiler

Re: [PATCH v3] powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImage

2022-08-28 Thread Pali Rohár
On Sunday 28 August 2022 17:39:25 Christophe Leroy wrote: > Le 28/08/2022 à 19:33, Christophe Leroy a écrit : > > > > > > Le 28/08/2022 à 11:56, Pali Rohár a écrit : > >> When CONFIG_TARGET_CPU is specified then pass its value to the compiler > >> -mcpu option. This fixes following build error

Re: [PATCH v3] powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImage

2022-08-28 Thread Christophe Leroy
Le 28/08/2022 à 19:33, Christophe Leroy a écrit : > > > Le 28/08/2022 à 11:56, Pali Rohár a écrit : >> When CONFIG_TARGET_CPU is specified then pass its value to the compiler >> -mcpu option. This fixes following build error when building kernel with >> powerpc e500 SPE capable cross

Re: [PATCH v3] powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImage

2022-08-28 Thread Christophe Leroy
Le 28/08/2022 à 11:56, Pali Rohár a écrit : > When CONFIG_TARGET_CPU is specified then pass its value to the compiler > -mcpu option. This fixes following build error when building kernel with > powerpc e500 SPE capable cross compilers: > > BOOTAS arch/powerpc/boot/crt0.o >

[PATCH v3] powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImage

2022-08-28 Thread Pali Rohár
When CONFIG_TARGET_CPU is specified then pass its value to the compiler -mcpu option. This fixes following build error when building kernel with powerpc e500 SPE capable cross compilers: BOOTAS arch/powerpc/boot/crt0.o powerpc-linux-gnuspe-gcc: error: unrecognized argument in option

Re: [PATCH v2] powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImage

2022-08-28 Thread Pali Rohár
On Sunday 28 August 2022 07:23:39 Christophe Leroy wrote: > Le 27/08/2022 à 21:00, Pali Rohár a écrit : > > On Saturday 27 August 2022 20:36:08 Pali Rohár wrote: > >> On Saturday 27 August 2022 18:32:42 Christophe Leroy wrote: > >>> Le 27/08/2022 à 19:36, Pali Rohár a écrit : > On Saturday 27

Re: [PATCH v2 00/10] crypto: Kconfig - simplify menus and help text

2022-08-28 Thread Christophe Leroy
Hi, Le 27/08/2022 à 22:06, Elliott, Robert (Servers) a écrit : > (adding Christophe, per > bba496656a73fc1 ("powerpc/32: Fix boot failure with GCC latent entropy > plugin") > > > Adding libmpc-devel gets all the architectures building except powerpc. > > (I also installed gcc-plugins-devel to

Re: [PATCH v2] powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImage

2022-08-28 Thread Christophe Leroy
Le 27/08/2022 à 21:00, Pali Rohár a écrit : > On Saturday 27 August 2022 20:36:08 Pali Rohár wrote: >> On Saturday 27 August 2022 18:32:42 Christophe Leroy wrote: >>> Le 27/08/2022 à 19:36, Pali Rohár a écrit : On Saturday 27 August 2022 17:31:10 Christophe Leroy wrote: > Le 27/08/2022