From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/4] ARM: Remove the domain switching on ARMv6k/v7 CPUs
Date: Tue, 22 Jun 2010 14:01:19 +0100 [thread overview]
Message-ID: <1277211679.29532.24.camel@e102109-lin.cambridge.arm.com> (raw)
In-Reply-To: <20100622124703.GA12613@oksana.dev.rtsoft.ru>
On Tue, 2010-06-22 at 13:47 +0100, Anton Vorontsov wrote:
> On Mon, Jun 21, 2010 at 03:46:26PM +0100, Catalin Marinas wrote:
> > This patch removes the domain switching functionality via the set_fs and
> > __switch_to functions on cores that have a TLS register.
> >
> > Currently, the ioremap and vmalloc areas share the same level 1 page
> > tables and therefore have the same domain (DOMAIN_KERNEL). When the
> > kernel domain is modified from Client to Manager (via the __set_fs or in
> > the __switch_to function), the XN (eXecute Never) bit is overridden and
> > newer CPUs can speculatively prefetch the ioremap'ed memory.
> >
> > Linux performs the kernel domain switching to allow user-specific
> > functions (copy_to/from_user, get/put_user etc.) to access kernel
> > memory. In order for these functions to work with the kernel domain set
> > to Client, the patch modifies the LDRT/STRT and related instructions to
> > the LDR/STR ones.
> >
> > The user pages access rights are also modified for kernel read-only
> > access rather than read/write so that the copy-on-write mechanism still
> > works. CPU_USE_DOMAINS gets disabled only if HAS_TLS_REG is defined
> > since writing the TLS value to the high vectors page isn't possible.
> >
> > The user addresses passed to the kernel are checked by the access_ok()
> > function so that they do not point to the kernel space.
> >
> > Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
>
> I tested this on ARMv6K (ARM11 MPcore) and ARMv7 (Cortex-A9), and
> didn't notice any issues. This is also needed for robust mutextes
> support... so, if that helps,
>
> Tested-by: Anton Vorontsov <cbouatmailru@gmail.com>
Thanks.
--
Catalin
next prev parent reply other threads:[~2010-06-22 13:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-21 14:46 [PATCH v4 0/4] Patches for -next Catalin Marinas
2010-06-21 14:46 ` [PATCH v4 1/4] ARM: Remove the domain switching on ARMv6k/v7 CPUs Catalin Marinas
2010-06-22 12:47 ` Anton Vorontsov
2010-06-22 13:01 ` Catalin Marinas [this message]
2010-06-21 14:46 ` [PATCH v4 2/4] ARM: Assume new page cache pages have dirty D-cache Catalin Marinas
2010-06-22 19:36 ` Rabin Vincent
2010-06-22 22:39 ` Catalin Marinas
2010-06-21 14:46 ` [PATCH v4 3/4] ARM: Synchronise the I and D caches via set_pte_at() on SMP systems Catalin Marinas
2010-06-21 14:46 ` [PATCH v4 4/4] ARM: Use lazy cache flushing on ARMv7 " Catalin Marinas
2010-06-22 10:29 ` [PATCH v4 0/4] Patches for -next Rabin Vincent
2010-06-22 11:34 ` Catalin Marinas
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=1277211679.29532.24.camel@e102109-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 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).