[PATCH v2 2/2] powerpc/hibernate: PPC64 fix user threads access to kernel space

Wang Dongsheng-B40534 B40534 at freescale.com
Sun Jun 9 17:57:37 EST 2013



> -----Original Message-----
> From: Benjamin Herrenschmidt [mailto:benh at kernel.crashing.org]
> Sent: Sunday, June 09, 2013 3:46 PM
> To: Wang Dongsheng-B40534
> Cc: johannes at sipsolutions.net; anton at enomsg.org; Wood Scott-B07421;
> galak at kernel.crashing.org; linuxppc-dev at lists.ozlabs.org
> Subject: Re: [PATCH v2 2/2] powerpc/hibernate: PPC64 fix user threads
> access to kernel space
> 
> On Sun, 2013-06-09 at 07:44 +0000, Wang Dongsheng-B40534 wrote:
> > So we just need set set_context() in restore_mmu_context().
> >
> > void restore_mmu_context(struct mm_struct *next) {
> >         set_context(next->context.id, next->pgd); }
> 
> We probably also want to flush the TLB, just in case the boot kernel has
> left "something" there (though I wouldn't expect it to have run userspace
> it's not completely impossible).
> 
Yes, but TLB has already invalidated.
See my other patch:
http://patchwork.ozlabs.org/patch/250006/

> Cheers,
> Ben.
> 
> 



More information about the Linuxppc-dev mailing list