All of lore.kernel.org
 help / color / mirror / Atom feed
From: afzal.mohd.ma@gmail.com (afzal mohammed)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4] arm: Fix memory attribute inconsistencies when using fixmap
Date: Sat, 8 Apr 2017 22:21:00 +0530	[thread overview]
Message-ID: <20170408165100.GA3589@afzalpc> (raw)
In-Reply-To: <1491494594.2950.7.camel@linaro.org>

Hi,

On Thu, Apr 06, 2017 at 05:03:14PM +0100, Jon Medhurst (Tixy) wrote:
> To cope with the variety in ARM architectures and configurations, the
> pagetable attributes for kernel memory are generated at runtime to match
> the system the kernel finds itself on. This calculated value is stored
> in pgprot_kernel.
> 
> However, when early fixmap support was added for ARM (commit
> a5f4c561b3b1) the attributes used for mappings were hard coded because
> pgprot_kernel is not set up early enough. Unfortunately, when fixmap is
> used after early boot this means the memory being mapped can have
> different attributes to existing mappings, potentially leading to
> unpredictable behaviour. A specific problem also exists due to the hard
> coded values not include the 'shareable' attribute which means on
> systems where this matters (e.g. those with multiple CPU clusters) the
> cache contents for a memory location can become inconsistent between
> CPUs.
> 
> To resolve these issues we change fixmap to use the same memory
> attributes (from pgprot_kernel) that the rest of the kernel uses. To
> enable this we need to refactor the initialisation code so
> build_mem_type_table() is called early enough. Note, that relies on early
> param parsing for memory type overrides passed via the kernel command
> line, so we need to make sure this call is still after
> parse_early_params().

Tested-by: afzal mohammed <afzal.mohd.ma@gmail.com>

with an emphasis on no-MMU's

Regards
afzal

  reply	other threads:[~2017-04-08 16:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-04  7:31 [PATCH v3] arm: Fix memory attribute inconsistencies when using fixmap Ard Biesheuvel
2017-04-04  8:48 ` Jon Medhurst (Tixy)
2017-04-04  9:10   ` Ard Biesheuvel
2017-04-04 16:01     ` Jon Medhurst (Tixy)
2017-04-05 22:42 ` Russell King - ARM Linux
2017-04-06 13:46   ` Jon Medhurst (Tixy)
2017-04-06 13:49     ` Ard Biesheuvel
2017-04-06 16:03       ` [PATCH v4] " Jon Medhurst (Tixy)
2017-04-08 16:51         ` afzal mohammed [this message]
2017-04-10 10:16           ` Jon Medhurst (Tixy)

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=20170408165100.GA3589@afzalpc \
    --to=afzal.mohd.ma@gmail.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.