From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
Miroslav Benes <mbenes@suse.cz>,
x86@kernel.org
Subject: Re: [PATCH] objtool: Fix stack-swizzle for FRAME_POINTER=y
Date: Thu, 18 Feb 2021 11:53:14 -0600 [thread overview]
Message-ID: <20210218175314.sdrkb3272bzezw3b@treble> (raw)
In-Reply-To: <YC6UC+rc9KKmQrkd@hirez.programming.kicks-ass.net>
On Thu, Feb 18, 2021 at 05:21:31PM +0100, Peter Zijlstra wrote:
> On Wed, Feb 10, 2021 at 08:01:23PM -0000, tip-bot2 for Peter Zijlstra wrote:
> > objtool: Support stack-swizzle
>
> ---
> Subject: objtool: Fix stack-swizzle for FRAME_POINTER=y
> From: Peter Zijlstra <peterz@infradead.org>
> Date: Thu Feb 18 17:14:10 CET 2021
>
> When objtool encounters the stack-swizzle:
>
> mov %rsp, (%[tos])
> mov %[tos], %rsp
> ...
> pop %rsp
>
> Inside a FRAME_POINTER=y build, things go a little screwy because
> clearly we're not adjusting the cfa->base. This then results in the
> pop %rsp not being detected as a restore of cfa->base so it will turn
> into a regular POP and offset the stack, resulting in:
>
> kernel/softirq.o: warning: objtool: do_softirq()+0xdb: return with modified stack frame
>
> Therefore, have "mov %[tos], %rsp" act like a PUSH (it sorta is
> anyway) to balance the things out. We're not too concerned with the
> actual stack_size for frame-pointer builds, since we don't generate
> ORC data for them anyway.
>
> Fixes: aafeb14e9da2 ("objtool: Support stack-swizzle")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
--
Josh
next prev parent reply other threads:[~2021-02-18 19:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 20:01 [tip: objtool/core] objtool: Support stack-swizzle tip-bot2 for Peter Zijlstra
2021-02-18 16:21 ` [PATCH] objtool: Fix stack-swizzle for FRAME_POINTER=y Peter Zijlstra
2021-02-18 17:53 ` Josh Poimboeuf [this message]
2021-02-22 11:08 ` [tip: objtool/core] " tip-bot2 for Peter Zijlstra
2021-02-22 19:00 ` [tip: x86/entry] " tip-bot2 for Peter Zijlstra
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=20210218175314.sdrkb3272bzezw3b@treble \
--to=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mbenes@suse.cz \
--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®