From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, Sathvika Vasireddy <sv@linux.ibm.com>
Cc: aik@ozlabs.ru, linux-kernel@vger.kernel.org,
peterz@infradead.org, mingo@redhat.com, rostedt@goodmis.org,
npiggin@gmail.com, jpoimboe@redhat.com, mbenes@suse.cz,
chenzhongjin@huawei.com
Subject: Re: [PATCH v4 03/16] powerpc: Fix objtool unannotated intra-function call warnings
Date: Mon, 10 Oct 2022 17:04:57 +0530 [thread overview]
Message-ID: <1665399265.kd8db2hfm4.naveen@linux.ibm.com> (raw)
In-Reply-To: <20221002104240.1316480-4-sv@linux.ibm.com>
Sathvika Vasireddy wrote:
> 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
> arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x124: unannotated intra-function call
> arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x5d4: unannotated intra-function call
> arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x5dc: unannotated intra-function call
> arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xcb8: unannotated intra-function call
> arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xd0c: unannotated intra-function call
> arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x1030: unannotated intra-function call
>
> arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x358: unannotated intra-function call
> arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x728: unannotated intra-function call
> arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x4d94: unannotated intra-function call
> arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x4ec4: unannotated intra-function call
>
> arch/powerpc/kvm/book3s_hv_interrupts.o: warning: objtool: .text+0x6c: unannotated intra-function call
> arch/powerpc/kernel/misc_64.o: warning: objtool: .text+0x64: unannotated intra-function call
>
> Objtool does not add STT_NOTYPE symbols with size 0 to the rbtree, which
> is why find_call_destination() function is not able to find the
> destination symbol for 'bl' instruction. For such symbols, objtool is
> throwing unannotated intra-function call warnings in assembly files. Fix
> these warnings 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 <christophe.leroy@csgroup.eu>
> Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
> ---
> arch/powerpc/kernel/exceptions-64s.S | 7 +++++--
> arch/powerpc/kernel/head_64.S | 7 +++++--
> arch/powerpc/kernel/misc_64.S | 4 +++-
> arch/powerpc/kernel/vector.S | 4 +++-
> arch/powerpc/kvm/book3s_hv_interrupts.S | 4 +++-
> arch/powerpc/kvm/book3s_hv_rmhandlers.S | 22 +++++++++++++++-------
> 6 files changed, 34 insertions(+), 14 deletions(-)
Applying this to powerpc/merge today shows two small conflicts:
>
> diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
> index 3d0dc133a9ae..56a31424c8b0 100644
> --- a/arch/powerpc/kernel/exceptions-64s.S
> +++ b/arch/powerpc/kernel/exceptions-64s.S
> @@ -13,6 +13,7 @@
> *
> */
>
> +#include <linux/linkage.h>
> #include <asm/hw_irq.h>
> #include <asm/exception-64s.h>
> #include <asm/ptrace.h>
> @@ -3075,7 +3076,7 @@ CLOSE_FIXED_SECTION(virt_trampolines);
> USE_TEXT_SECTION()
>
> /* MSR[RI] should be clear because this uses SRR[01] */
> -enable_machine_check:
> +SYM_FUNC_START_LOCAL(enable_machine_check)
This is now a _GLOBAL(), so this hunk and the below
SYM_FUNC_END(enable_machine_check) change can be dropped.
> mflr r0
> bcl 20,31,$+4
> 0: mflr r3
> @@ -3087,9 +3088,10 @@ enable_machine_check:
> RFI_TO_KERNEL
> 1: mtlr r0
> blr
> +SYM_FUNC_END(enable_machine_check)
>
> /* MSR[RI] should be clear because this uses SRR[01] */
> -disable_machine_check:
> +SYM_FUNC_START_LOCAL(disable_machine_check)
> mflr r0
> bcl 20,31,$+4
> 0: mflr r3
> @@ -3102,3 +3104,4 @@ disable_machine_check:
> RFI_TO_KERNEL
> 1: mtlr r0
> blr
> +SYM_FUNC_END(disable_machine_check)
> diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
> index cf2c08902c05..10e2d43420d0 100644
> --- a/arch/powerpc/kernel/head_64.S
> +++ b/arch/powerpc/kernel/head_64.S
> @@ -18,6 +18,7 @@
> * variants.
> */
>
> +#include <linux/linkage.h>
> #include <linux/threads.h>
> #include <linux/init.h>
> #include <asm/reg.h>
> @@ -465,7 +466,7 @@ generic_secondary_common_init:
> * Assumes we're mapped EA == RA if the MMU is on.
> */
> #ifdef CONFIG_PPC_BOOK3S
> -__mmu_off:
> +SYM_FUNC_START_LOCAL(__mmu_off)
> mfmsr r3
> andi. r0,r3,MSR_IR|MSR_DR
> beqlr
> @@ -476,6 +477,7 @@ __mmu_off:
> sync
> rfid
> b . /* prevent speculative execution */
> +SYM_FUNC_END(__mmu_off)
> #endif
>
>
> @@ -869,7 +871,7 @@ _GLOBAL(start_secondary_resume)
> /*
> * This subroutine clobbers r11 and r12
> */
> -enable_64b_mode:
> +SYM_FUNC_START_LOCAL(enable_64b_mode)
> mfmsr r11 /* grab the current MSR */
> #ifdef CONFIG_PPC_BOOK3E
> oris r11,r11,0x8000 /* CM bit set, we'll set ICM later */
> @@ -881,6 +883,7 @@ enable_64b_mode:
> isync
> #endif
> blr
> +SYM_FUNC_END(enable_64b_mode)
>
> /*
> * This puts the TOC pointer into r2, offset by 0x8000 (as expected
> diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
> index fd6d8d3a548e..b36fb89ff718 100644
> --- a/arch/powerpc/kernel/misc_64.S
> +++ b/arch/powerpc/kernel/misc_64.S
> @@ -9,6 +9,7 @@
> * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
> */
>
> +#include <linux/linkage.h>
> #include <linux/sys.h>
> #include <asm/unistd.h>
> #include <asm/errno.h>
> @@ -353,7 +354,7 @@ _GLOBAL(kexec_smp_wait)
> *
> * don't overwrite r3 here, it is live for kexec_wait above.
> */
> -real_mode: /* assume normal blr return */
> +SYM_FUNC_START_LOCAL(real_mode) /* assume normal blr return */
> #ifdef CONFIG_PPC_BOOK3E
The #ifdef is now for CONFIG_PPC_BOOK3E_64.
The rest of the series apply properly.
- Naveen
next prev parent reply other threads:[~2022-10-10 11:36 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-02 10:42 [PATCH v4 00/16] objtool: Enable and implement --mcount option on powerpc Sathvika Vasireddy
2022-10-02 10:42 ` [PATCH v4 01/16] powerpc: Fix __WARN_FLAGS() for use with Objtool Sathvika Vasireddy
2022-10-02 10:42 ` [PATCH v4 02/16] powerpc: Override __ALIGN and __ALIGN_STR macros Sathvika Vasireddy
2022-10-02 17:41 ` Christophe Leroy
2022-10-02 10:42 ` [PATCH v4 03/16] powerpc: Fix objtool unannotated intra-function call warnings Sathvika Vasireddy
2022-10-10 11:34 ` Naveen N. Rao [this message]
2022-10-02 10:42 ` [PATCH v4 04/16] powerpc: Curb objtool unannotated intra-function warnings Sathvika Vasireddy
2022-10-02 10:42 ` [PATCH v4 05/16] powerpc: Skip objtool from running on drivers/crypto/vmx/aesp8-ppc.o Sathvika Vasireddy
2022-10-02 10:42 ` [PATCH v4 06/16] powerpc: Fix objtool unannotated intra-function call warnings on PPC32 Sathvika Vasireddy
2022-10-02 10:42 ` [PATCH v4 07/16] powerpc: Skip objtool from running on VDSO files Sathvika Vasireddy
2022-10-02 10:42 ` [PATCH v4 08/16] objtool: Fix SEGFAULT Sathvika Vasireddy
2022-10-02 10:42 ` [PATCH v4 09/16] objtool: Use target file endianness instead of a compiled constant Sathvika Vasireddy
2022-10-02 10:42 ` [PATCH v4 10/16] objtool: Use target file class size " Sathvika Vasireddy
2022-10-02 10:42 ` [PATCH v4 11/16] objtool: Add --mnop as an option to --mcount Sathvika Vasireddy
2022-10-02 17:40 ` Christophe Leroy
2022-10-10 11:37 ` Naveen N. Rao
2022-10-11 20:33 ` Josh Poimboeuf
2022-10-12 13:47 ` Naveen N. Rao
2022-10-02 10:42 ` [PATCH v4 12/16] objtool: Read special sections with alts only when specific options are selected Sathvika Vasireddy
2022-10-02 17:42 ` Christophe Leroy
2022-10-02 10:42 ` [PATCH v4 13/16] objtool: Use macros to define arch specific reloc types Sathvika Vasireddy
2022-10-02 10:42 ` [PATCH v4 14/16] objtool: Add arch specific function arch_ftrace_match() Sathvika Vasireddy
2022-10-02 10:42 ` [PATCH v4 15/16] objtool/powerpc: Enable objtool to be built on ppc Sathvika Vasireddy
2022-10-02 10:42 ` [PATCH v4 16/16] objtool/powerpc: Add --mcount specific implementation Sathvika Vasireddy
2022-10-02 17:42 ` Christophe Leroy
2022-10-10 11:49 ` [PATCH v4 00/16] objtool: Enable and implement --mcount option on powerpc Naveen N. Rao
[not found] ` <notmuch-sha1-66fb111b87471c685a53b80a0502d959f90d07a7>
2022-10-13 0:05 ` Josh Poimboeuf
2022-10-13 3:40 ` Naveen N. Rao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1665399265.kd8db2hfm4.naveen@linux.ibm.com \
--to=naveen.n.rao@linux.vnet.ibm.com \
--cc=aik@ozlabs.ru \
--cc=chenzhongjin@huawei.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mbenes@suse.cz \
--cc=mingo@redhat.com \
--cc=npiggin@gmail.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sv@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).