On Wed, 18 Jul 2018, Brian Gerst wrote:
> > +.Lcopy_pt_regs_\@:
> > +#endif
> > +
> > + /* Allocate frame on task-stack */
> > + subl %ecx, %edi
> > +
> > + /* Switch to task-stack */
> > + movl %edi, %esp
> > +
> > + /*
> > + * We are now on the task-stack and can safely copy over the
> > + * stack-frame
> > + */
> > + shrl $2, %ecx
>
> This shift can be removed if you divide the constants by 4 above.
> Ditto on the exit path in the next patch.
No, the
> > + /* Allocate frame on task-stack */
> > + subl %ecx, %edi
needs the full value in bytes ....
Thanks,
tglx