From: Peter Zijlstra <peterz@infradead.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Juergen Gross <jgross@suse.com>,
xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
Miroslav Benes <mbenes@suse.cz>,
Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Subject: Re: [PATCH 3/3] objtool: Support stack layout changes in alternatives
Date: Mon, 4 Jan 2021 15:09:52 +0100 [thread overview]
Message-ID: <20210104140952.GQ3021@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <9f78604e49b400eb3b2ca613591f8c357474ed4e.1608700338.git.jpoimboe@redhat.com>
On Tue, Dec 22, 2020 at 11:18:10PM -0600, Josh Poimboeuf wrote:
> For example, this scenario is allowed:
>
> Alt1 Alt2 Alt3
>
> 0x00 CALL *pv_ops.save_fl CALL xen_save_fl PUSHF
> 0x01 POP %RAX
> 0x02 NOP
> ...
> 0x05 NOP
> ...
> 0x07 <insn>
>
> This scenario is NOT allowed:
>
> Alt1 Alt2
>
> 0x00 CALL *pv_ops.save_fl PUSHF
> 0x01 NOP6
> ...
> 0x07 NOP POP %RAX
>
> The problem here is that offset-0x7, which is an instruction boundary in
> both possible instruction patch streams, has two conflicting stack
> layouts.
There's another fun scenario:
0x00 CALL *pv_ops.save_fl PUSHF
0x01 NOP2
..
0x03 NOP5
..
0x07 NOP2
0x08 POP %RAX
0x09 <insn>
No conflicting boundary at 0x07, but still buggered.
Let me go read the actual patch to see if this is handled.
next prev parent reply other threads:[~2021-01-04 14:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-23 5:18 [PATCH 0/3] Alternatives vs ORC, a slightly easier way Josh Poimboeuf
2020-12-23 5:18 ` [PATCH 1/3] objtool: Refactor ORC section generation Josh Poimboeuf
2020-12-23 5:18 ` [PATCH 2/3] objtool: Add 'alt_group' struct Josh Poimboeuf
2020-12-23 5:18 ` [PATCH 3/3] objtool: Support stack layout changes in alternatives Josh Poimboeuf
2021-01-04 14:09 ` Peter Zijlstra [this message]
2021-01-04 15:16 ` Josh Poimboeuf
2021-01-04 15:48 ` Peter Zijlstra
2021-01-07 13:22 ` Miroslav Benes
2021-01-07 18:18 ` Josh Poimboeuf
2021-01-08 8:15 ` Miroslav Benes
2021-01-14 0:21 ` 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=20210104140952.GQ3021@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=jgross@suse.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=shinichiro.kawasaki@wdc.com \
--cc=xen-devel@lists.xenproject.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®