[PATCH v2 1/2] powerpc/sstep: Add emulation support for ‘setb’ instruction

2021-05-11 Thread Sathvika Vasireddy
This adds emulation support for the following instruction: * Set Boolean (setb) Signed-off-by: Sathvika Vasireddy --- arch/powerpc/lib/sstep.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index 45bda2520755

[PATCH v2 0/2] powerpc/sstep: Add emulation support and tests for 'setb' instruction

2021-05-11 Thread Sathvika Vasireddy
etb' emulation code after 'mfcr' instruction emulation. - Add 'cpu_feature' in the selftests patch to restrict them to ISA v3.0 Sathvika Vasireddy (2): powerpc/sstep: Add emulation support for ‘setb’ instruction powerpc/sstep: Add tests for setb instruction arch/powerpc/include/asm/ppc-opcod

[PATCH v2 2/2] powerpc/sstep: Add tests for setb instruction

2021-05-11 Thread Sathvika Vasireddy
This adds selftests for setb instruction. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/include/asm/ppc-opcode.h | 1 + arch/powerpc/lib/test_emulate_step.c | 29 + 2 files changed, 30 insertions(+) diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch

[PATCH 0/2] powerpc/sstep: Add emulation support and tests for 'setb' instruction

2021-04-16 Thread Sathvika Vasireddy
This patchset adds emulation support and tests for setb instruction. Test cases are written to test different CR fields with different bits set in each field. Sathvika Vasireddy (2): powerpc/sstep: Add emulation support for ‘setb’ instruction powerpc/sstep: Add tests for setb instruction

[PATCH 2/2] powerpc/sstep: Add tests for setb instruction

2021-04-16 Thread Sathvika Vasireddy
This adds selftests for setb instruction. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/include/asm/ppc-opcode.h | 1 + arch/powerpc/lib/test_emulate_step.c | 28 +++ 2 files changed, 29 insertions(+) diff --git a/arch/powerpc/include/asm/ppc-opcode.h b

[PATCH 1/2] powerpc/sstep: Add emulation support for ‘setb’ instruction

2021-04-16 Thread Sathvika Vasireddy
This adds emulation support for the following instruction: * Set Boolean (setb) Signed-off-by: Sathvika Vasireddy --- arch/powerpc/lib/sstep.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index c6aebc149d14

[RFC PATCH 1/3] objtool: Move common code to utils.c

2022-03-18 Thread Sathvika Vasireddy
This patch moves common code to utils.c file. Code from this file will be reused across check.c and mcount.c (will be introduced in the coming patches). Also, ensure that this change works well with existing commands. Signed-off-by: Sathvika Vasireddy --- tools/objtool/Build

[RFC PATCH 2/3] objtool: Enable and implement 'mcount' subcommand

2022-03-18 Thread Sathvika Vasireddy
is passed as an option to 'objtool mcount' Signed-off-by: Sathvika Vasireddy --- Makefile| 6 ++ arch/x86/Kconfig| 3 +- scripts/Makefile.build | 12 +++ tools/objtool/Build | 2 + tools/objtool

[RFC PATCH 0/3] objtool: Add mcount sub-command

2022-03-18 Thread Sathvika Vasireddy
"objtool mcount" for clang LTO builds. Sathvika Vasireddy (3): objtool: Move common code to utils.c objtool: Enable and implement 'mcount' subcommand objtool/mcount: Add powerpc specific functions Makefile | 6 + arch/power

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

2022-03-18 Thread Sathvika Vasireddy
This patch adds powerpc specific functions required for 'objtool mcount' to work, and enables mcount for ppc. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/Kconfig | 1 + tools/objtool/Makefile| 4 ++ tools/objtool/arch/powerpc/Build

Re: [RFC PATCH v2 0/7] objtool: Enable and implement --mcount option on powerpc

2022-05-25 Thread Sathvika Vasireddy
On 25/05/22 23:09, Christophe Leroy wrote: Hi Sathvika, Le 25/05/2022 à 12:14, Sathvika Vasireddy a écrit : Hi Christophe, On 24/05/22 18:47, Christophe Leroy wrote: This draft series adds PPC32 support to Sathvika's series. Verified on pmac32 on QEMU. It should in principle also work

[RFC PATCH 2/4] objtool: Enable objtool to run only on files with ftrace enabled

2022-05-23 Thread Sathvika Vasireddy
This patch makes sure objtool runs only on the object files that have ftrace enabled, instead of running on all the object files. Signed-off-by: Naveen N. Rao Signed-off-by: Sathvika Vasireddy --- scripts/Makefile.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[RFC PATCH 3/4] objtool/powerpc: Enable objtool to be built on ppc

2022-05-23 Thread Sathvika Vasireddy
This patch adds [stub] implementations for required functions, inorder to enable objtool build on powerpc. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/Kconfig | 1 + tools/objtool/arch/powerpc/Build | 2 + tools/objtool/arch/powerpc/decode.c

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

2022-05-23 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 | 14 ++ tools/objtool/check.c | 12 +++- tools

[RFC PATCH 1/4] objtool: Add --mnop as an option to --mcount

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

[RFC PATCH 0/4] objtool: Enable and implement --mcount option on powerpc

2022-05-23 Thread Sathvika Vasireddy
These patches are rebased on top of objtool/core branch of the tip tree, and work only on ppc64le for now. Note: With this patch set, there are still some warnings seen with ppc64le kernel build. Sathvika Vasireddy (4): objtool: Add --mnop as an option to --mcount objtool: Enable objtool

Re: [RFC PATCH v2 0/7] objtool: Enable and implement --mcount option on powerpc

2022-05-25 Thread Sathvika Vasireddy
Hi Christophe, On 24/05/22 18:47, Christophe Leroy wrote: This draft series adds PPC32 support to Sathvika's series. Verified on pmac32 on QEMU. It should in principle also work for PPC64 BE but for the time being something goes wrong. In the beginning I had a segfaut hence the first patch.

Re: [RFC PATCH v2 5/7] objtool: Enable objtool to run only on files with ftrace enabled

2022-05-25 Thread Sathvika Vasireddy
wrote: From: Sathvika Vasireddy This patch makes sure objtool runs only on the object files that have ftrace enabled, instead of running on all the object files. Signed-off-by: Naveen N. Rao Signed-off-by: Sathvika Vasireddy Signed-off-by: Christophe Leroy --- scripts/Makefile.build | 4 ++-- 1

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

2022-05-24 Thread Sathvika Vasireddy
On 24/05/22 15:05, Christophe Leroy wrote: Le 23/05/2022 à 19:55, Sathvika Vasireddy a écrit : This patch enables objtool --mcount on powerpc, and adds implementation specific to powerpc. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/Kconfig| 1 + tools/objtool

Re: [RFC PATCH 2/4] objtool: Enable objtool to run only on files with ftrace enabled

2022-05-24 Thread Sathvika Vasireddy
Hi Christophe, On 24/05/22 14:27, Christophe Leroy wrote: Le 23/05/2022 à 19:55, Sathvika Vasireddy a écrit : This patch makes sure objtool runs only on the object files that have ftrace enabled, instead of running on all the object files. Why do that ? This was done to address the issue

[RFC PATCH v3 12/12] objtool/powerpc: Fix unannotated intra-function call warnings

2022-06-24 Thread Sathvika Vasireddy
/book3s_hv_interrupts.o: warning: objtool: .text+0x6c: unannotated intra-function call Remove a few of these warnings by putting ANNOTATE_INTRA_FUNCTION_CALL directive before the call. And, the rest by annotating those functions with SYM_FUNC_START_LOCAL() and SYM_FUNC_END() macros. Signed-off-by: Sathvika

[RFC PATCH v3 07/12] objtool: Use macros to define arch specific reloc types

2022-06-24 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

[RFC PATCH v3 08/12] objtool: Add arch specific function arch_ftrace_match()

2022-06-24 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

[RFC PATCH v3 04/12] objtool: Add --mnop as an option to --mcount

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

[RFC PATCH v3 03/12] objtool: Use target file class size instead of a compiled constant

2022-06-24 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

Re: [RFC PATCH v2 0/7] objtool: Enable and implement --mcount option on powerpc

2022-06-24 Thread Sathvika Vasireddy
Hi Christophe, On 24/06/22 12:38, Christophe Leroy wrote: Is everything going ok ? Don't hesitate if you need help. Yeah, sure. Thanks! I just posted RFC v3 here: https://patchwork.ozlabs.org/project/linuxppc-dev/cover/20220624183238.388144-1...@linux.ibm.com/

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

2022-06-24 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

[RFC PATCH v3 05/12] powerpc: Skip objtool from running on VDSO files

2022-06-24 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

[RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-24 Thread Sathvika Vasireddy
objtool is throwing *unannotated intra-function call* warnings with a few instructions that are marked unreachable. Remove unreachable() from WARN_ON() to fix these warnings, as the codegen remains same with and without unreachable() in WARN_ON(). Signed-off-by: Sathvika Vasireddy --- arch

[RFC PATCH v3 02/12] objtool: Use target file endianness instead of a compiled constant

2022-06-24 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.

[RFC PATCH v3 01/12] objtool: Fix SEGFAULT

2022-06-24 Thread Sathvika Vasireddy
From: Christophe Leroy Signed-off-by: Christophe Leroy --- tools/objtool/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 190b2f6e360a..6cb07e151588 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@

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

2022-06-24 Thread Sathvika Vasireddy
constant Sathvika Vasireddy(9): objtool: Add --mnop as an option to --mcount powerpc: Skip objtool from running on VDSO files objtool: Read special sections with alts only when specific options are selected objtool: Use macros to define arch specific reloc types objtool: Add arch

[RFC PATCH v3 09/12] objtool/powerpc: Enable objtool to be built on ppc

2022-06-24 Thread Sathvika Vasireddy
This patch adds [stub] implementations for required functions, inorder to enable objtool build on powerpc. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/Kconfig | 1 + tools/objtool/arch/powerpc/Build | 2 + tools/objtool/arch/powerpc/decode.c

[RFC PATCH v3 10/12] objtool/powerpc: Add --mcount specific implementation

2022-06-24 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

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-27 Thread Sathvika Vasireddy
On 25/06/22 12:16, Christophe Leroy wrote: Le 24/06/2022 à 20:32, Sathvika Vasireddy a écrit : objtool is throwing *unannotated intra-function call* warnings with a few instructions that are marked unreachable. Remove unreachable() from WARN_ON() to fix these warnings, as the codegen remains

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-07-01 Thread Sathvika Vasireddy
Hi Chen, Thanks for pitching in and providing your inputs :-) On 01/07/22 07:43, Chen Zhongjin wrote: Hi everyone, Hope I'm not too late for this discussion. I'm not familiar with ppc so it spent me some time to reproduce this. But at last I didn't make it. What I did: 1 checkout to

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-27 Thread Sathvika Vasireddy
On 25/06/22 12:16, Christophe Leroy wrote: Le 24/06/2022 à 20:32, Sathvika Vasireddy a écrit : objtool is throwing *unannotated intra-function call* warnings with a few instructions that are marked unreachable. Remove unreachable() from WARN_ON() to fix these warnings, as the codegen remains

Re: [RFC PATCH v2 0/7] objtool: Enable and implement --mcount option on powerpc

2022-06-17 Thread Sathvika Vasireddy
Hi Christophe, On 15/06/22 21:33, Christophe Leroy wrote: Do you have any idea when you plan to send next revision ? I'm really looking forward to submitting the inline static calls on top of your series. I'm planning to send RFC v3 next week. - Sathvika

[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

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 02/16] powerpc: override __ALIGN() and __ALIGN_STR() macros

2022-08-28 Thread Sathvika Vasireddy
alignment, override __ALIGN() and __ALIGN_STR() macros to use required 4 byte alignment. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/include/asm/linkage.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/include/asm/linkage.h b/arch/powerpc/include/asm/linkage.h index

[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

[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 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

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

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

2022-08-28 Thread Sathvika Vasireddy
to such files, unless absolutely necessary. Second reason is that, at least as far as the objtool --mcount functionality is concerned, we do not have to run objtool on that file because that file does not have any calls to _mcount. Signed-off-by: Sathvika Vasireddy --- drivers/crypto/vmx/Makefile | 2

[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 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 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 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 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 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 03/16] powerpc: Fix objtool unannotated intra-function call warnings

2022-08-28 Thread Sathvika Vasireddy
by adding SYM_FUNC_START_LOCAL() and SYM_FUNC_END() annotations to those symbols to be able to set symbol type to STT_FUNC and set size of these symbols accordingly. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/kernel/exceptions-64s.S| 7 +-- arch/powerpc/kernel/head_64.S

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

2022-08-28 Thread Sathvika Vasireddy
size instead of a compiled constant powerpc: Fix objtool unannotated intra-function call warnings on PPC32 Sathvika Vasireddy (12): powerpc: Replace unreachable() with it's builtin variant in __WARN_FLAGS() powerpc: override __ALIGN() and __ALIGN_STR() macros powerpc: Fix objtool

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

2022-08-28 Thread Sathvika Vasireddy
barrier_before_unreachable() before __builtin_unreachable() to work around a gcc bug [1], for the problem reported at [2]. [1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106751 [2]: https://lkml.org/lkml/2022/8/25/418 Signed-off-by: Sathvika Vasireddy --- arch/powerpc/include/asm/bug.h | 3 ++- 1

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

2022-08-28 Thread Sathvika Vasireddy
/book3s_hv_rmhandlers.o: warning: objtool: .text+0xee4: unannotated intra-function call Fix these warnings by annotating intra-function call, using ANNOTATE_INTRA_FUNCTION_CALL macro, to indicate that the branch targets are valid. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/kernel/entry_64.S

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

2022-08-18 Thread Sathvika Vasireddy
On 10/08/22 14:02, Christophe Leroy wrote: Le 08/08/2022 à 13:48, Sathvika Vasireddy a écrit : 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

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

2022-08-18 Thread Sathvika Vasireddy
On 10/08/22 14:04, Christophe Leroy wrote: Le 08/08/2022 à 13:48, Sathvika Vasireddy a écrit : 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

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

2022-08-18 Thread Sathvika Vasireddy
Hi Christophe, On 10/08/22 14:01, Christophe Leroy wrote: Le 08/08/2022 à 13:48, Sathvika Vasireddy a écrit : Since we need an alignment of 4 bytes, override __ALIGN() and __ALIGN_STR() accordingly. Why/When do we now need an alignment of 4 bytes ? Please explain the reason in the commit

[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 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 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 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 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 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 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 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 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 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 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 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 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 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

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 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 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 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 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 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 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 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 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 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 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 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

[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 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 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 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 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 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 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 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 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

  1   2   >