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] arm64: efi: don't restore TTBR0 if active_mm points at init_mm
Date: Mon, 23 Mar 2015 17:50:55 +0000	[thread overview]
Message-ID: <20150323175055.GD12757@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <1427131377.2693.25.camel@linaro.org>

On Mon, Mar 23, 2015 at 05:22:57PM +0000, Jon Medhurst (Tixy) wrote:
> On Mon, 2015-03-23 at 15:44 +0000, Catalin Marinas wrote:
> > From 5d9e3540b6480558528612dd3672543fa8ab3528 Mon Sep 17 00:00:00 2001
> > From: Catalin Marinas <catalin.marinas@arm.com>
> > Date: Mon, 23 Mar 2015 15:06:50 +0000
> > Subject: [PATCH] arm64: Use the reserved TTBR0 if context switching to the
> >  init_mm
> > 
> > The idle_task_exit() function may call switch_mm() with next ==
> > &init_mm. On arm64, init_mm.pgd cannot be used for user mappings, so
> > this patch simply sets the reserved TTBR0.
> > 
> > Cc: <stable@vger.kernel.org>
> > Reported-by: Jon Medhurst (Tixy) <tixy@linaro.org>
> > Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> 
> That unsurprising fixes the BUG_ON I was seeing on Juno, so...
> Tested-by: Jon Medhurst (Tixy) <tixy@linaro.org>

Thanks.

> One question, is bypassing setting the mm_cpumask and context.id for
> init_mm OK? I'm not familiar with the code but had a quick look, and it
> looks like they are just used for ASID management, in which case I
> assume everything is OK - ASIDs only being relevant for user mappings in
> ttbr0?

That's my thinking as well. Will asked me the same question, so I'll let
him confirm if he's seeing anything wrong.

-- 
Catalin

  reply	other threads:[~2015-03-23 17:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-19 15:43 [PATCH] arm64: efi: don't restore TTBR0 if active_mm points at init_mm Will Deacon
2015-03-19 16:01 ` Ard Biesheuvel
2015-03-23 13:22 ` Jon Medhurst (Tixy)
2015-03-23 15:44   ` Catalin Marinas
2015-03-23 17:22     ` Jon Medhurst (Tixy)
2015-03-23 17:50       ` Catalin Marinas [this message]
2015-03-23 18:00         ` 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=20150323175055.GD12757@e104818-lin.cambridge.arm.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.