All of lore.kernel.org
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: mm: ensure TTBR0 is restored when changing ASID on rollover
Date: Wed, 8 Jun 2011 14:04:35 +0100	[thread overview]
Message-ID: <BANLkTimnqrMtdvicvvwCwPRqQjZSTSXhFw@mail.gmail.com> (raw)
In-Reply-To: <1307443118-11573-1-git-send-email-will.deacon@arm.com>

On 7 June 2011 11:38, Will Deacon <will.deacon@arm.com> wrote:
> In 52af9c6c ("ARM: 6943/1: mm: use TTBR1 instead of reserved context ID")
> I updated the ASID rollover code to use only the kernel page tables
> whilst updating the ASID.
>
> Unfortunately, the code to restore the user page tables was part of a
> later patch which isn't yet in mainline, so this leaves the code
> quite broken.

IOW, after an ASID roll-over on SMP, the cross-called reset_context()
function sets TTBR0 to swapper_pg_dir but never sets it back to the
one of the currently running process. So interrupted user space
processes would fault when returning from an ASID roll-over event
happening on a different CPU.

> This patch fixes the issue by calling cpu_switch_mm to change the ASID
> which has the side-effect of setting up TTBR0 to point to the user
> tables.
>
> Reported-by: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Will Deacon <will.deacon@arm.com>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

  reply	other threads:[~2011-06-08 13:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07 10:38 [PATCH] ARM: mm: ensure TTBR0 is restored when changing ASID on rollover Will Deacon
2011-06-08 13:04 ` Catalin Marinas [this message]
2011-06-08 20:01 ` Russell King - ARM Linux
2011-06-08 20:23   ` Will Deacon
2011-06-08 20:36     ` Russell King - ARM Linux
2011-06-08 20:49       ` Will Deacon
2011-06-08 20:55         ` Russell King - ARM Linux
2011-11-23  3:46           ` Stephen Boyd
2011-06-08 21:12       ` Catalin Marinas
2011-06-08 21:49         ` Russell King - ARM Linux
  -- strict thread matches above, loose matches on Subject: below --
2011-05-31 15:39 Will Deacon

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=BANLkTimnqrMtdvicvvwCwPRqQjZSTSXhFw@mail.gmail.com \
    --to=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.