Re: [PATCH 3/3] objtool: Support stack layout changes in alternatives

2021-01-13 Thread Josh Poimboeuf
On Fri, Jan 08, 2021 at 09:15:43AM +0100, Miroslav Benes wrote: > > That comment is indeed now obsolete. I can squash something like so: > > > > diff --git a/tools/objtool/check.c b/tools/objtool/check.c > > index 81d56fdef1c3..ce67437aaf3f 100644 > > --- a/tools/objtool/check.c > > +++

Re: [PATCH 3/3] objtool: Support stack layout changes in alternatives

2021-01-08 Thread Miroslav Benes
> That comment is indeed now obsolete. I can squash something like so: > > diff --git a/tools/objtool/check.c b/tools/objtool/check.c > index 81d56fdef1c3..ce67437aaf3f 100644 > --- a/tools/objtool/check.c > +++ b/tools/objtool/check.c > @@ -958,21 +958,8 @@ static int

Re: [PATCH 3/3] objtool: Support stack layout changes in alternatives

2021-01-07 Thread Josh Poimboeuf
On Thu, Jan 07, 2021 at 02:22:27PM +0100, Miroslav Benes wrote: > On Tue, 22 Dec 2020, Josh Poimboeuf wrote: > > > BTW, another benefit of these changes is that, thanks to some related > > cleanups (new fake nops and alt_group struct) objtool can finally be rid > > of fake jumps, which were a

Re: [PATCH 3/3] objtool: Support stack layout changes in alternatives

2021-01-07 Thread Miroslav Benes
On Tue, 22 Dec 2020, Josh Poimboeuf wrote: > BTW, another benefit of these changes is that, thanks to some related > cleanups (new fake nops and alt_group struct) objtool can finally be rid > of fake jumps, which were a constant source of headaches. \o/ You may also want to remove/edit the

Re: [PATCH 3/3] objtool: Support stack layout changes in alternatives

2021-01-04 Thread Peter Zijlstra
On Mon, Jan 04, 2021 at 09:16:33AM -0600, Josh Poimboeuf wrote: > > There's another fun scenario: > > > > 0x00 CALL *pv_ops.save_flPUSHF > > 0x01 NOP2 > > .. > > 0x03 NOP5 > > .. > > 0x07

Re: [PATCH 3/3] objtool: Support stack layout changes in alternatives

2021-01-04 Thread Josh Poimboeuf
On Mon, Jan 04, 2021 at 03:09:52PM +0100, Peter Zijlstra wrote: > On Tue, Dec 22, 2020 at 11:18:10PM -0600, Josh Poimboeuf wrote: > > > For example, this scenario is allowed: > > > > Alt1Alt2Alt3 > > > >0x00 CALL *pv_ops.save_flCALL

Re: [PATCH 3/3] objtool: Support stack layout changes in alternatives

2021-01-04 Thread Peter Zijlstra
On Tue, Dec 22, 2020 at 11:18:10PM -0600, Josh Poimboeuf wrote: > For example, this scenario is allowed: > > Alt1Alt2Alt3 > >0x00 CALL *pv_ops.save_flCALL xen_save_flPUSHF >0x01

[PATCH 3/3] objtool: Support stack layout changes in alternatives

2020-12-22 Thread Josh Poimboeuf
The ORC unwinder showed a warning [1] which revealed the stack layout didn't match what was expected. The problem was that paravirt patching had replaced "CALL *pv_ops.irq.save_fl" with "PUSHF;POP". That changed the stack layout between the PUSHF and the POP, so unwinding from an interrupt which