linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Wang Dongsheng-B40534 <B40534@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
	"johannes@sipsolutions.net" <johannes@sipsolutions.net>,
	"anton@enomsg.org" <anton@enomsg.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v2 2/2] powerpc/hibernate: PPC64 fix user threads access to kernel space
Date: Sun, 09 Jun 2013 17:45:46 +1000	[thread overview]
Message-ID: <1370763946.14883.24.camel@pasglop> (raw)
In-Reply-To: <ABB05CD9C9F68C46A5CEDC7F15439259F6D57B@039-SN2MPN1-021.039d.mgd.msft.net>

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).

Cheers,
Ben.

  reply	other threads:[~2013-06-09  7:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-09  5:22 [PATCH v2 2/2] powerpc/hibernate: PPC64 fix user threads access to kernel space Wang Dongsheng
2013-06-09  6:43 ` Benjamin Herrenschmidt
2013-06-09  7:44   ` Wang Dongsheng-B40534
2013-06-09  7:45     ` Benjamin Herrenschmidt [this message]
2013-06-09  7:57       ` Wang Dongsheng-B40534
2013-06-09 11:31 ` Wang Dongsheng-B40534

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370763946.14883.24.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=B07421@freescale.com \
    --cc=B40534@freescale.com \
    --cc=anton@enomsg.org \
    --cc=johannes@sipsolutions.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).