Re: [RFC PATCH 1/2] objtool: Run objtool only if either of the config options are selected

2024-04-22 Thread Sathvika Vasireddy
Hi Masahiro, thanks for reviewing. On 4/22/24 5:39 PM, Masahiro Yamada wrote: On Mon, Apr 22, 2024 at 6:25 PM Sathvika Vasireddy wrote: Currently, when objtool is enabled and none of the supported options are triggered, kernel build errors out with the below error: error: objtool: At least

[RFC PATCH 2/2] objtool/powerpc: Enhance objtool to fixup alternate feature relative addresses

2024-04-22 Thread Sathvika Vasireddy
. Posting this as an initial RFC to get some review comments while I work on big endian issues. [1] https://lore.kernel.org/linuxppc-dev/20170521010130.13552-1-npig...@gmail.com/ Co-developed-by: Nicholas Piggin Signed-off-by: Nicholas Piggin Signed-off-by: Sathvika Vasireddy --- arch/Kconfig

[RFC PATCH 1/2] objtool: Run objtool only if either of the config options are selected

2024-04-22 Thread Sathvika Vasireddy
-by: Sathvika Vasireddy --- scripts/Makefile.lib | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 3179747cbd2c..c65bb0fbd136 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -286,7 +286,10 @@ objtool-args = $(objtool-args-y

[RFC PATCH] powerpc/Kconfig: Select FUNCTION_ALIGNMENT_4B

2023-03-06 Thread 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 N

Re: [PATCH 1/2] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope

2023-02-24 Thread Sathvika Vasireddy
On 23/02/23 10:39, Kautuk Consul wrote: Hi Sathvika, Just one question though. Went through the code again and I think that this place shouldn't be proper to insert a SYM_FUNC_END because we haven't entered the guest at this point and the name of the function is kvmppc_hv_entry which I think

Re: [PATCH 1/2] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope

2023-02-20 Thread Sathvika Vasireddy
On 20/02/23 12:58, Kautuk Consul wrote: Hi Sathvika, (Sorry didn't include list in earlier email.) On Mon, Feb 20, 2023 at 12:35:09PM +0530, Sathvika Vasireddy wrote: Hi Kautuk, On 20/02/23 10:53, Kautuk Consul wrote: kvmppc_hv_entry isn't called from anywhere other than

Re: [PATCH 1/2] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope

2023-02-19 Thread Sathvika Vasireddy
Hi Kautuk, On 20/02/23 10:53, Kautuk Consul wrote: kvmppc_hv_entry isn't called from anywhere other than book3s_hv_rmhandlers.S itself. Removing .global scope for this function. Signed-off-by: Kautuk Consul --- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 1 - 1 file changed, 1 deletion(-)

[PATCH] powerpc/64: Fix unannotated intra-function call warning

2023-02-16 Thread Sathvika Vasireddy
-off-by: Sathvika Vasireddy --- arch/powerpc/kernel/head_64.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 3a7266fa8a18..1febb56ebaeb 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel

Re: [PATCH AUTOSEL 6.1 18/38] powerpc/kvm: Fix unannotated intra-function call warning

2023-02-10 Thread Sathvika Vasireddy
Hi Sasha, On 09/02/23 16:44, Sasha Levin wrote: From: Sathvika Vasireddy [ Upstream commit fe6de81b610e5d0b9d2231acff2de74a35482e7d ] objtool throws the following warning: arch/powerpc/kvm/booke.o: warning: objtool: kvmppc_fill_pt_regs+0x30: unannotated intra-function call Fix

Re: [PATCH AUTOSEL 6.1 17/38] powerpc/85xx: Fix unannotated intra-function call warning

2023-02-10 Thread Sathvika Vasireddy
Hi Sasha, On 09/02/23 16:44, Sasha Levin wrote: From: Sathvika Vasireddy [ Upstream commit 8afffce6aa3bddc940ac1909627ff1e772b6cbf1 ] objtool throws the following warning: arch/powerpc/kernel/head_85xx.o: warning: objtool: .head.text+0x1a6c: unannotated intra-function call Fix

[PATCH] powerpc/kvm: Fix objtool warning for unannotated intra-function call in booke.o

2023-01-28 Thread Sathvika Vasireddy
to save the instruction pointer. Reported-by: kernel test robot Suggested-by: Michael Ellerman Signed-off-by: Sathvika Vasireddy --- arch/powerpc/kvm/booke.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index

[PATCH] powerpc: Fix objtool warning for unannotated intra-function call in head_85xx.o

2023-01-28 Thread Sathvika Vasireddy
Objtool throws the following warning: arch/powerpc/kernel/head_85xx.o: warning: objtool: .head.text+0x1a6c: unannotated intra-function call Fix this warning by annotating KernelSPE symbol with SYM_FUNC_START_LOCAL and SYM_FUNC_END macros. Reported-by: kernel test robot Signed-off-by: Sathvika

Re: crypto: p10-aes-gcm - Add asm markings necessary for kernel code

2023-01-18 Thread Sathvika Vasireddy
Hi Stephen, On 18/01/23 08:34, Stephen Rothwell wrote: Hi Herbert, On Tue, 17 Jan 2023 15:26:24 +0800 Herbert Xu wrote: On Tue, Jan 17, 2023 at 02:47:47PM +1100, Stephen Rothwell wrote: Hi all, After merging the crypto tree, today's linux-next build (powerpc pseries_le_defconfig) failed

Re: [PATCH] objtool: continue if find_insn() fails in decode_instructions()

2023-01-09 Thread Sathvika Vasireddy
On 09/01/23 22:23, Ingo Molnar wrote: * Sathvika Vasireddy wrote: Hi Ingo, Happy New Year! Happy New Year to you too! :-) On 07/01/23 15:51, Ingo Molnar wrote: * Sathvika Vasireddy wrote: Currently, decode_instructions() is failing if it is not able to find instruction

Re: [PATCH] objtool: continue if find_insn() fails in decode_instructions()

2023-01-09 Thread Sathvika Vasireddy
Hi Ingo, Happy New Year! On 07/01/23 15:51, Ingo Molnar wrote: * Sathvika Vasireddy wrote: Currently, decode_instructions() is failing if it is not able to find instruction, and this is happening since commit dbcdbdfdf137b4 ("objtool: Rework instruction -> symbol mapping&q

[PATCH] powerpc/32: Curb objtool unannotated intra-function call warning

2022-12-15 Thread Sathvika Vasireddy
test robot Signed-off-by: Sathvika Vasireddy --- arch/powerpc/kexec/relocate_32.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kexec/relocate_32.S b/arch/powerpc/kexec/relocate_32.S index d9f0dd9b34ff..104c9911f406 100644 --- a/arch/powerpc/kexec/relocate_32.S +++ b/arch

[PATCH] objtool: continue if find_insn() fails in decode_instructions()

2022-12-07 Thread Sathvika Vasireddy
ound, instead of throwing warning and returning. Signed-off-by: Naveen N. Rao Signed-off-by: Sathvika Vasireddy --- tools/objtool/check.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 4350be739f4f..bce2be5ebf36 100644 --- a/

Re: linux-next: build warnings after merge of the powerpc-objtool tree

2022-11-30 Thread Sathvika Vasireddy
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 warnings: arch/powerpc

Re: linux-next: build warnings after merge of the powerpc-objtool tree

2022-11-29 Thread Sathvika Vasireddy
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 warnings: arch/powerpc/kernel/head_64.o: warning: objtool: end_first_256B(): can't find starting instruction

[PATCH v6 16/16] objtool/powerpc: Add --mcount specific implementation

2022-11-14 Thread Sathvika Vasireddy
This patch enables objtool --mcount on powerpc, and adds implementation specific to powerpc. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- arch/powerpc/Kconfig | 1

[PATCH v6 15/16] objtool/powerpc: Enable objtool to be built on ppc

2022-11-14 Thread Sathvika Vasireddy
This patch adds [stub] implementations for required functions, inorder to enable objtool build on powerpc. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy [Christophe Leroy: powerpc: Add missing asm/asm.h for objtool, Use local

[PATCH v6 14/16] objtool: Add arch specific function arch_ftrace_match()

2022-11-14 Thread Sathvika Vasireddy
Add architecture specific function to look for relocation records pointing to architecture specific symbols. Suggested-by: Christophe Leroy Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- tools

[PATCH v6 13/16] objtool: Use macros to define arch specific reloc types

2022-11-14 Thread Sathvika Vasireddy
Make relocation types architecture specific. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Peter Zijlstra (Intel) Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- tools/objtool/arch/x86/include/arch/elf.h | 2 ++ tools/objtool

[PATCH v6 12/16] objtool: Read special sections with alts only when specific options are selected

2022-11-14 Thread Sathvika Vasireddy
Call add_special_section_alts() only when stackval or orc or uaccess or noinstr options are passed to objtool. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- tools/objtool/check.c | 8

[PATCH v6 11/16] objtool: Add --mnop as an option to --mcount

2022-11-14 Thread Sathvika Vasireddy
. Also, make sure that --mnop can be passed as an option to objtool only when --mcount is passed. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Acked-by: Josh Poimboeuf Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- Makefile| 4

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

2022-11-14 Thread Sathvika Vasireddy
-by: Peter Zijlstra (Intel) Signed-off-by: Christophe Leroy [Sathvika Vasireddy: Rename variable "size" to "addrsize" and function "elf_class_size()" to "elf_class_addrsize()", and modify create_mcount_loc_sections() function to follow reverse christmas tree for

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

2022-11-14 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 v6 08/16] objtool: Fix SEGFAULT

2022-11-14 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. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Acked-by: Josh Poimboeuf Acked-by: Peter Zijlstra (Intel) Signed-off-by: Christophe Leroy ---

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

2022-11-14 Thread Sathvika Vasireddy
Do not run objtool on VDSO files, by using OBJECT_FILES_NON_STANDARD. Suggested-by: Christophe Leroy Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- arch/powerpc/kernel/vdso/Makefile | 2 ++ 1

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

2022-11-14 Thread Sathvika Vasireddy
From: Christophe Leroy Fix several annotations in assembly files on PPC32. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Acked-by: Josh Poimboeuf Signed-off-by: Christophe Leroy [Sathvika Vasireddy: Changed subject line from "objtool/powerpc: Activate objtool on PPC32" t

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

2022-11-14 Thread Sathvika Vasireddy
Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- drivers/crypto/vmx/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/vmx/Makefile b/drivers/crypto/vmx/Makefile index 2560cfea1dec..7b41f0da6807 100644 --- a/drivers/crypto/vmx/Makefile +++ b/drivers

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

2022-11-14 Thread Sathvika Vasireddy
Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- arch/powerpc/kernel/entry_64.S | 2 ++ arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 +++ 2 files changed, 5 insertions(+) diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 3e2e37e6ecab

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

2022-11-14 Thread Sathvika Vasireddy
by annotating those symbols with SYM_FUNC_START_LOCAL and SYM_FUNC_END macros, inorder to set symbol type to STT_FUNC and symbol size accordingly. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy

[PATCH v6 02/16] powerpc: Override __ALIGN and __ALIGN_STR macros

2022-11-14 Thread Sathvika Vasireddy
alignment as that of the existing _GLOBAL macro. Also, do not pad with 0x90, because repeated 0x90s are not a nop or trap on powerpc. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- arch/powerpc

[PATCH v6 01/16] powerpc: Fix __WARN_FLAGS() for use with Objtool

2022-11-14 Thread Sathvika Vasireddy
gcc.gnu.org/bugzilla/show_bug.cgi?id=106751 Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- arch/powerpc/include/asm/bug.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc

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

2022-11-14 Thread Sathvika Vasireddy
xmas tree format. - Add Signed-off-by tag from Sathvika Vasireddy indicating changes done. - Add Acked-by tag from Peter Zijlstra. * Patch 11/16 - Update changelog to indicate that powerpc kernel does not support nop'ed out ftrace

Re: [PATCH v5 02/16] powerpc: Override __ALIGN and __ALIGN_STR macros

2022-11-13 Thread Sathvika Vasireddy
Hi Peter, On 03/11/22 14:18, Peter Zijlstra wrote: On Wed, Nov 02, 2022 at 12:35:07PM +, Christophe Leroy wrote: Le 28/10/2022 à 16:33, Sathvika Vasireddy a écrit : In a subsequent patch, we would want to annotate powerpc assembly functions with SYM_FUNC_START_LOCAL macro. This macro

[PATCH v5 16/16] objtool/powerpc: Add --mcount specific implementation

2022-10-28 Thread Sathvika Vasireddy
This patch enables objtool --mcount on powerpc, and adds implementation specific to powerpc. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- arch/powerpc/Kconfig | 1

[PATCH v5 15/16] objtool/powerpc: Enable objtool to be built on ppc

2022-10-28 Thread Sathvika Vasireddy
This patch adds [stub] implementations for required functions, inorder to enable objtool build on powerpc. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy [Christophe Leroy: powerpc: Add missing asm/asm.h for objtool, Use local

[PATCH v5 14/16] objtool: Add arch specific function arch_ftrace_match()

2022-10-28 Thread Sathvika Vasireddy
Add architecture specific function to look for relocation records pointing to architecture specific symbols. Suggested-by: Christophe Leroy Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- tools

[PATCH v5 13/16] objtool: Use macros to define arch specific reloc types

2022-10-28 Thread Sathvika Vasireddy
Make relocation types architecture specific. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Peter Zijlstra (Intel) Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- tools/objtool/arch/x86/include/arch/elf.h | 2 ++ tools/objtool

[PATCH v5 12/16] objtool: Read special sections with alts only when specific options are selected

2022-10-28 Thread Sathvika Vasireddy
Call add_special_section_alts() only when stackval or orc or uaccess or noinstr options are passed to objtool. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- tools/objtool/check.c | 8

[PATCH v5 11/16] objtool: Add --mnop as an option to --mcount

2022-10-28 Thread Sathvika Vasireddy
. Also, make sure that --mnop can be passed as an option to objtool only when --mcount is passed. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Acked-by: Josh Poimboeuf Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- Makefile| 4

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

2022-10-28 Thread Sathvika Vasireddy
-by: Peter Zijlstra (Intel) Signed-off-by: Christophe Leroy [Sathvika Vasireddy: Rename variable "size" to "addrsize" and function "elf_class_size()" to "elf_class_addrsize()", and modify create_mcount_loc_sections() function to follow reverse christmas tree for

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

2022-10-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 v5 08/16] objtool: Fix SEGFAULT

2022-10-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. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Acked-by: Josh Poimboeuf Acked-by: Peter Zijlstra (Intel) Signed-off-by: Christophe Leroy ---

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

2022-10-28 Thread Sathvika Vasireddy
Do not run objtool on VDSO files, by using OBJECT_FILES_NON_STANDARD. Suggested-by: Christophe Leroy Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- arch/powerpc/kernel/vdso/Makefile | 2 ++ 1

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

2022-10-28 Thread Sathvika Vasireddy
From: Christophe Leroy Fix several annotations in assembly files on PPC32. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Acked-by: Josh Poimboeuf Signed-off-by: Christophe Leroy [Sathvika Vasireddy: Changed subject line from "objtool/powerpc: Activate objtool on PPC32" t

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

2022-10-28 Thread Sathvika Vasireddy
Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- drivers/crypto/vmx/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/vmx/Makefile b/drivers/crypto/vmx/Makefile index 2560cfea1dec..7b41f0da6807 100644 --- a/drivers/crypto/vmx/Makefile +++ b/drivers

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

2022-10-28 Thread Sathvika Vasireddy
Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- arch/powerpc/kernel/entry_64.S | 2 ++ arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 +++ 2 files changed, 5 insertions(+) diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 3e2e37e6ecab

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

2022-10-28 Thread Sathvika Vasireddy
by annotating those symbols with SYM_FUNC_START_LOCAL and SYM_FUNC_END macros, inorder to set symbol type to STT_FUNC and symbol size accordingly. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy

[PATCH v5 02/16] powerpc: Override __ALIGN and __ALIGN_STR macros

2022-10-28 Thread Sathvika Vasireddy
alignment as that of the existing _GLOBAL macro. Also, do not pad with 0x90, because repeated 0x90s are not a nop or trap on powerpc. Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- arch/powerpc

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

2022-10-28 Thread Sathvika Vasireddy
Peter Zijlstra. * Patch 09/16 - Add Acked-by tag from Peter Zijlstra. * Patch 10/16 - Reorder local variable declarations to use reverse xmas tree format. - Add Signed-off-by tag from Sathvika Vasireddy indicating changes done. - Add Acked

[PATCH v5 01/16] powerpc: Fix __WARN_FLAGS() for use with Objtool

2022-10-28 Thread Sathvika Vasireddy
gcc.gnu.org/bugzilla/show_bug.cgi?id=106751 Tested-by: Naveen N. Rao Reviewed-by: Naveen N. Rao Reviewed-by: Christophe Leroy Acked-by: Josh Poimboeuf Signed-off-by: Sathvika Vasireddy --- arch/powerpc/include/asm/bug.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc

[PATCH v4 16/16] objtool/powerpc: Add --mcount specific implementation

2022-10-02 Thread Sathvika Vasireddy
This patch enables objtool --mcount on powerpc, and adds implementation specific to powerpc. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/Kconfig | 1 + tools/objtool/arch/powerpc/decode.c | 16 tools/objtool/arch/powerpc/include/arch

[PATCH v4 15/16] objtool/powerpc: Enable objtool to be built on ppc

2022-10-02 Thread Sathvika Vasireddy
This patch adds [stub] implementations for required functions, inorder to enable objtool build on powerpc. Signed-off-by: Sathvika Vasireddy [Christophe Leroy: powerpc: Add missing asm/asm.h for objtool, Use local variables for type and imm in arch_decode_instruction(), Adapt len for prefixed

[PATCH v4 14/16] objtool: Add arch specific function arch_ftrace_match()

2022-10-02 Thread Sathvika Vasireddy
Add architecture specific function to look for relocation records pointing to architecture specific symbols. Suggested-by: Christophe Leroy Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- tools/objtool/arch/x86/decode.c | 5 + tools/objtool/check.c

[PATCH v4 13/16] objtool: Use macros to define arch specific reloc types

2022-10-02 Thread Sathvika Vasireddy
Make relocation types architecture specific. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- tools/objtool/arch/x86/include/arch/elf.h | 2 ++ tools/objtool/check.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion

[PATCH v4 12/16] objtool: Read special sections with alts only when specific options are selected

2022-10-02 Thread Sathvika Vasireddy
Call add_special_section_alts() only when stackval or orc or uaccess or noinstr options are passed to objtool. Signed-off-by: Sathvika Vasireddy --- tools/objtool/check.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c

[PATCH v4 11/16] objtool: Add --mnop as an option to --mcount

2022-10-02 Thread Sathvika Vasireddy
. Also, make sure that --mnop can be passed as an option to objtool only when --mcount is passed. Signed-off-by: Sathvika Vasireddy --- Makefile| 4 +++- arch/x86/Kconfig| 1 + kernel/trace/Kconfig| 7 +++ scripts

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

2022-10-02 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. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Christophe Leroy [Sathvika Vasireddy

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

2022-10-02 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 v4 08/16] objtool: Fix SEGFAULT

2022-10-02 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. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Christophe Leroy --- tools/objtool/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

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

2022-10-02 Thread Sathvika Vasireddy
Do not run objtool on VDSO files, by using OBJECT_FILES_NON_STANDARD. Suggested-by: Christophe Leroy Reviewed-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 b

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

2022-10-02 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 PPC3

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

2022-10-02 Thread Sathvika Vasireddy
to make too many code changes to such files, unless absolutely necessary. - As far as the objtool --mcount functionality is concerned, we do not have to run objtool on this file because there are no calls to _mcount. Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- drivers

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

2022-10-02 Thread Sathvika Vasireddy
/book3s_hv_rmhandlers.o: warning: objtool: .text+0xee4: unannotated intra-function call Fix these warnings by annotating intra-function calls, using ANNOTATE_INTRA_FUNCTION_CALL macro, to indicate that the branch targets are valid. Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- arch

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

2022-10-02 Thread Sathvika Vasireddy
by annotating those symbols with SYM_FUNC_START_LOCAL and SYM_FUNC_END macros, inorder to set symbol type to STT_FUNC and symbol size accordingly. Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- arch/powerpc/kernel/exceptions-64s.S| 7 +-- arch/powerpc/kernel/head_64

[PATCH v4 02/16] powerpc: Override __ALIGN and __ALIGN_STR macros

2022-10-02 Thread Sathvika Vasireddy
alignment as that of the existing _GLOBAL macro. Also, do not pad with 0x90, because repeated 0x90s are not a nop or trap on powerpc. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/include/asm/linkage.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/include/asm/linkage.h b

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

2022-10-02 Thread Sathvika Vasireddy
. * Patch 08/16 - Add Acked-by tag from Peter Zijlstra. * Patch 09/16 - Add Acked-by tag from Peter Zijlstra. * Patch 10/16 - Reorder local variable declarations to use reverse xmas tree format. - Add Signed-off-by tag from Sathvika Vasireddy indicating

[PATCH v4 01/16] powerpc: Fix __WARN_FLAGS() for use with Objtool

2022-10-02 Thread Sathvika Vasireddy
gcc.gnu.org/bugzilla/show_bug.cgi?id=106751 Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- arch/powerpc/include/asm/bug.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/bug.h b/arch/powerpc/include/asm/bug.h index 61a4736355c2..ef42adb44a

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

2022-09-21 Thread Sathvika Vasireddy
Hi Josh, On 14/09/22 05:45, Josh Poimboeuf wrote: On Tue, Sep 13, 2022 at 04:13:52PM +0200, Peter Zijlstra wrote: On Mon, Sep 12, 2022 at 01:50:04PM +0530, Sathvika Vasireddy wrote: Christophe Leroy (4): objtool: Fix SEGFAULT objtool: Use target file endianness instead of a compiled

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

2022-09-12 Thread Sathvika Vasireddy
Do not run objtool on VDSO files, by using OBJECT_FILES_NON_STANDARD. Suggested-by: Christophe Leroy Reviewed-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 b

[PATCH v3 15/16] objtool/powerpc: Enable objtool to be built on ppc

2022-09-12 Thread Sathvika Vasireddy
This patch adds [stub] implementations for required functions, inorder to enable objtool build on powerpc. Signed-off-by: Sathvika Vasireddy [Christophe Leroy: powerpc: Add missing asm/asm.h for objtool, Use local variables for type and imm in arch_decode_instruction(), Adapt len for prefixed

[PATCH v3 16/16] objtool/powerpc: Add --mcount specific implementation

2022-09-12 Thread Sathvika Vasireddy
This patch enables objtool --mcount on powerpc, and adds implementation specific to powerpc. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/Kconfig | 1 + tools/objtool/arch/powerpc/decode.c | 16 tools/objtool/arch/powerpc/include/arch

[PATCH v3 13/16] objtool: Use macros to define arch specific reloc types

2022-09-12 Thread Sathvika Vasireddy
Make relocation types architecture specific. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- tools/objtool/arch/x86/include/arch/elf.h | 2 ++ tools/objtool/check.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion

[PATCH v3 14/16] objtool: Add arch specific function arch_ftrace_match()

2022-09-12 Thread Sathvika Vasireddy
Add architecture specific function to look for relocation records pointing to architecture specific symbols. Suggested-by: Christophe Leroy Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- tools/objtool/arch/x86/decode.c | 5 + tools/objtool/check.c

[PATCH v3 12/16] objtool: Read special sections with alts only when specific options are selected

2022-09-12 Thread Sathvika Vasireddy
Call add_special_section_alts() only when stackval or orc or uaccess or noinstr options are passed to objtool. Signed-off-by: Sathvika Vasireddy --- tools/objtool/check.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c

[PATCH v3 11/16] objtool: Add --mnop as an option to --mcount

2022-09-12 Thread Sathvika Vasireddy
that --mnop can be passed as an option to objtool only when --mcount is passed. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- Makefile| 4 +++- arch/x86/Kconfig| 1 + scripts/Makefile.lib

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

2022-09-12 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 PPC3

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

2022-09-12 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. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Christophe Leroy [Sathvika Vasireddy

[PATCH v3 08/16] objtool: Fix SEGFAULT

2022-09-12 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. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Christophe Leroy --- tools/objtool/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

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

2022-09-12 Thread Sathvika Vasireddy
to make too many code changes to such files, unless absolutely necessary. - As far as the objtool --mcount functionality is concerned, we do not have to run objtool on this file because there are no calls to _mcount. Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- drivers

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

2022-09-12 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 v3 04/16] powerpc: Curb objtool unannotated intra-function warnings

2022-09-12 Thread Sathvika Vasireddy
/book3s_hv_rmhandlers.o: warning: objtool: .text+0xee4: unannotated intra-function call Fix these warnings by annotating intra-function calls, using ANNOTATE_INTRA_FUNCTION_CALL macro, to indicate that the branch targets are valid. Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- arch

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

2022-09-12 Thread Sathvika Vasireddy
by annotating those symbols with SYM_FUNC_START_LOCAL and SYM_FUNC_END macros, which set symbol type to STT_FUNC and symbol size accordingly. Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- arch/powerpc/kernel/exceptions-64s.S| 7 +-- arch/powerpc/kernel/head_64.S

[PATCH v3 02/16] powerpc: Override __ALIGN and __ALIGN_STR macros

2022-09-12 Thread Sathvika Vasireddy
alignment as that of the existing _GLOBAL macro. Also, do not pad with 0x90, because repeated 0x90s are not a nop or trap on powerpc. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/include/asm/linkage.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/include/asm/linkage.h b

[PATCH v3 01/16] powerpc: Fix __WARN_FLAGS() for use with Objtool

2022-09-12 Thread Sathvika Vasireddy
gcc.gnu.org/bugzilla/show_bug.cgi?id=106751 Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- arch/powerpc/include/asm/bug.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/bug.h b/arch/powerpc/include/asm/bug.h index 61a4736355c2..ef42adb44a

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

2022-09-12 Thread Sathvika Vasireddy
. * Patch 08/16 - Add Acked-by tag from Peter Zijlstra. * Patch 09/16 - Add Acked-by tag from Peter Zijlstra. * Patch 10/16 - Reorder local variable declarations to use reverse xmas tree format. - Add Signed-off-by tag from Sathvika Vasireddy indicating

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

2022-08-29 Thread Sathvika Vasireddy
Hi Christophe, On 29/08/22 18:56, Christophe Leroy wrote: Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit : 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

[PATCH v2 16/16] objtool/powerpc: Add --mcount specific implementation

2022-08-29 Thread Sathvika Vasireddy
This patch enables objtool --mcount on powerpc, and adds implementation specific to powerpc. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/Kconfig | 1 + tools/objtool/arch/powerpc/decode.c | 22 +++ tools/objtool/arch/powerpc/include

[PATCH v2 15/16] objtool/powerpc: Enable objtool to be built on ppc

2022-08-29 Thread Sathvika Vasireddy
This patch adds [stub] implementations for required functions, inorder to enable objtool build on powerpc. Signed-off-by: Sathvika Vasireddy [Christophe Leroy: powerpc: Add missing asm/asm.h for objtool] Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 1

[PATCH v2 14/16] objtool: Add arch specific function arch_ftrace_match()

2022-08-29 Thread Sathvika Vasireddy
Add architecture specific function to look for relocation records pointing to arch specific symbols. Suggested-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- tools/objtool/arch/x86/decode.c | 8 tools/objtool/check.c| 2 +- tools/objtool/include

[PATCH v2 13/16] objtool: Use macros to define arch specific reloc types

2022-08-29 Thread Sathvika Vasireddy
Make relocation types architecture specific. Signed-off-by: Sathvika Vasireddy --- tools/objtool/arch/x86/include/arch/elf.h | 2 ++ tools/objtool/check.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/objtool/arch/x86/include/arch/elf.h b/tools

[PATCH v2 12/16] objtool: Read special sections with alts only when specific options are selected

2022-08-29 Thread Sathvika Vasireddy
This patch reads special sections which have alternate instructions, only when stackval or orc or uaccess or noinstr options are passed to objtool. Signed-off-by: Sathvika Vasireddy --- tools/objtool/check.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools

[PATCH v2 11/16] objtool: Add --mnop as an option to --mcount

2022-08-29 Thread Sathvika Vasireddy
-by: Sathvika Vasireddy --- Makefile| 4 +++- arch/x86/Kconfig| 1 + scripts/Makefile.lib| 1 + tools/objtool/builtin-check.c | 14 ++ tools/objtool/check.c | 19

[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 b/arch/powerpc/kernel/vdso

  1   2   >