Re: [PATCH v10 04/11] x86/entry/64: Adapt assembly for PIE support
From: Borislav Petkov
Date: Fri Dec 20 2019 - 11:05:50 EST
On Fri, Dec 06, 2019 at 08:35:09AM -0800, Thomas Garnier wrote:
> > Yes, but there it made sense since the PUSH actually created that field
> > of the frame, here it is nonsensical. What this instruction does is put
> > the address of the '1f' label into RDX, which is then stuck into the
> > (R)IP field on the next instruction.
>
> Got it, make sense. Thanks.
>
> >
> > > > > + movq %rdx, 8(%rsp) /* Put 1f on return address */
And pls write it out as "put the address of the '1f' label into RDX"
instead of "Put 1f on return address" which could be misunderstood.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette