From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] objtool: Fix STACK_FRAME_NON_STANDARD reloc type
Date: Fri, 29 Apr 2022 13:13:25 -0700 [thread overview]
Message-ID: <20220429201325.d5kifdezdru2i3lp@treble> (raw)
In-Reply-To: <20220429092024.GT2731@worktop.programming.kicks-ass.net>
On Fri, Apr 29, 2022 at 11:20:24AM +0200, Peter Zijlstra wrote:
>
> STACK_FRAME_NON_STANDARD results in inconsistent relocation types
> depending on .c or .S usage:
>
> Relocation section '.rela.discard.func_stack_frame_non_standard' at offset 0x3c01090 contains 5 entries:
> Offset Info Type Symbol's Value Symbol's Name + Addend
> 0000000000000000 00020c2200000002 R_X86_64_PC32 0000000000047b40 do_suspend_lowlevel + 0
> 0000000000000008 0002461e00000001 R_X86_64_64 00000000000480a0 machine_real_restart + 0
> 0000000000000010 0000001400000001 R_X86_64_64 0000000000000000 .rodata + b3d4
> 0000000000000018 0002444600000002 R_X86_64_PC32 00000000000678a0 __efi64_thunk + 0
> 0000000000000020 0002659d00000001 R_X86_64_64 0000000000113160 __crash_kexec + 0
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
> include/linux/objtool.h | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> --- a/include/linux/objtool.h
> +++ b/include/linux/objtool.h
> @@ -137,7 +137,11 @@ struct unwind_hint {
>
> .macro STACK_FRAME_NON_STANDARD func:req
> .pushsection .discard.func_stack_frame_non_standard, "aw"
> - .long \func - .
> +#ifdef CONFIG_64BIT
> + .quad \func
> +#else
> + .long \func
> +#endif
> .popsection
> .endm
Can use _ASM_PTR here, and objtool.h needs synced to tools.
--
Josh
next prev parent reply other threads:[~2022-04-29 20:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-29 9:20 Peter Zijlstra
2022-04-29 12:00 ` Peter Zijlstra
2022-04-29 22:56 ` Josh Poimboeuf
2022-04-30 11:44 ` Peter Zijlstra
2022-05-02 17:59 ` Josh Poimboeuf
2022-05-04 15:42 ` Masami Hiramatsu
2022-05-04 15:23 ` Masami Hiramatsu
2022-04-29 20:13 ` Josh Poimboeuf [this message]
2022-04-29 21:22 ` [PATCH v2] " Peter Zijlstra
2022-04-29 21:53 ` Josh Poimboeuf
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=20220429201325.d5kifdezdru2i3lp@treble \
--to=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®