Subject: Re: [PATCH] powerpc: Add support for userspace P9 copy paste

From: Michael Neuling <[email-masked]>
Date: Wed, 27 Apr 2016 12:05:24 +1000

On Tue, 2016-04-26 at 17:45 +1000, Balbir Singh wrote:
> > 
> > /*
> >  * System calls.
> > @@ -508,6 +509,14 @@ BEGIN_FTR_SECTION
> >     ldarx    r6,0,r1
> > END_FTR_SECTION_IFSET(CPU_FTR_STCX_CHECKS_ADDRESS)
> > 
> > +BEGIN_FTR_SECTION
> > +/*
> > + * A cp_abort (copy paste abort) here ensures that when context
> > switching, a
> > + * copy from one process can't leak into the paste of another.
> > + */
> > +        PPC_CP_ABORT
> I think the alignment issue has been called out, but it is not clear from
> the changelog that
> we do this during syscall_exit/syscalls.

I don't think we need this during syscall entry exit until we use this
in the kernel.

> And also, do we need to care about preemptions, etc by the scheduler?

This handles the userspace preemption case.

kernel support is not handled here, so kernel preemption is TBD.

Mikey

> 
> > 
> > +END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
> > +
> > #ifdef CONFIG_PPC_BOOK3S
> > /* Cancel all explict user streams as they will have no use after context
> >  * switch and will stop the HW from creating streams itself
> _______________________________________________
> Linuxppc-dev mailing list
> [email-masked]
> https://lists.ozlabs.org/listinfo/linuxppc-dev