linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Revert "arm64: mm: set the contiguous bit for kernel mappings where appropriate"
Date: Thu, 23 Feb 2017 16:30:37 +0000	[thread overview]
Message-ID: <20170223163037.GA25065@leverpostej> (raw)
In-Reply-To: <CAKv+Gu9q-gUaJG1OfUoi+FszFZ10RZJJtWjedRv9O=sZ11fm4A@mail.gmail.com>

On Thu, Feb 23, 2017 at 04:25:26PM +0000, Ard Biesheuvel wrote:
> On 23 February 2017 at 16:22, Mark Rutland <mark.rutland@arm.com> wrote:
> > This reverts commit 0bfc445dec9dd8130d22c9f4476eed7598524129.
> >
> > When we change the permissions of regions mapped using contiguous
> > entries, the architecture requires us to follow a Break-Before-Make
> > strategy, breaking *all* associated entries before we can change any of
> > the following properties from the entries:
> >
> >  - presence of the contiguous bit
> >  - output address
> >  - attributes
> >  - permissiones
> >
> > Failure to do so can result in a number of problems (e.g. TLB conflict
> > aborts and/or erroneous results from TLB lookups).
> >
> > See ARM DDI 0487A.k_iss10775, "Misprogramming of the Contiguous bit",
> > page D4-1762.
> >
> > We do not take this into account when altering the permissions of kernel
> > segments in mark_rodata_ro(), where we change the permissions of live
> > contiguous entires one-by-one, leaving them transiently inconsistent.
> > This has been observed to result in failures on some fast model
> > configurations.
> >
> > Unfortunately, we cannot follow Break-Before-Make here as we'd have to
> > unmap kernel text and data used to perform the sequence.
> >
> > For the timebeing, revert commit 0bfc445dec9dd813 so as to avoid issues
> > resulting from this misuse of the contiguous bit.
> >
> > Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> > Reported-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: Will Deacon <Will.Deacon@arm.com>
> > Cc: stable at vger.kernel.org # v4.10
> 
> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Cheers.

> > ---
> >  arch/arm64/mm/mmu.c | 34 ++++------------------------------
> >  1 file changed, 4 insertions(+), 30 deletions(-)
> >
> > I'm aware that our hugtlbpage code has a similar issue. I'm looking into that
> > now, and will address that with separate patches. It should be possible to use
> > BBM there as it's a userspace mapping.
> 
> Are you looking into this issue as well?

I'm looking into it now.

Thanks,
Mark.

      reply	other threads:[~2017-02-23 16:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 16:22 [PATCH] Revert "arm64: mm: set the contiguous bit for kernel mappings where appropriate" Mark Rutland
2017-02-23 16:25 ` Ard Biesheuvel
2017-02-23 16:30   ` Mark Rutland [this message]

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=20170223163037.GA25065@leverpostej \
    --to=mark.rutland@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 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).