linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: cbouatmailru@gmail.com (Anton Vorontsov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Add PI/robust mutexes support for SMP kernels
Date: Tue, 8 Jun 2010 01:31:45 +0400	[thread overview]
Message-ID: <20100607213145.GA23421@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <1275944170.11056.7.camel@toshiba-laptop>

On Mon, Jun 07, 2010 at 09:56:10PM +0100, Catalin Marinas wrote:
> On Mon, 2010-06-07 at 20:44 +0100, Russell King - ARM Linux wrote:
> > On Mon, Jun 07, 2010 at 09:36:30PM +0400, Anton Vorontsov wrote:
> > > To support PI or robust mutexes, the kernel needs to perform some
> > > operations atomically on userspace addresses, and yet ARM lacked
> > > the support for the SMP case.
> > >
> > > ARMv6 adds exclusive access variants of ldr and str instructions,
> > > which means that support for PI/robust mutexes should now be
> > > relatively straightforward.
> > 
> > It isn't this straight forward.  You're now bypassing the MMU protections
> > in that 'strex' can bypass the read-only protection of the user page.
> > This can result in the zero BSS page being corrupted, or worse corruption
> > to page cache pages.
> 
> Do you mean STREX in SVC mode targeting user pages? I keep posting a
> patch for more than a year :) which removes the domains switching and
> makes user pages read-only for both kernel and user space.

Wow. Then I should just make PI/robust mutexes depend on
!CONFIG_CPU_USE_DOMAINS (which is actually always true for SMP :-).

Thanks!

-- 
Anton Vorontsov
email: cbouatmailru at gmail.com
irc://irc.freenode.net/bd2

      reply	other threads:[~2010-06-07 21:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07 17:36 [PATCH] ARM: Add PI/robust mutexes support for SMP kernels Anton Vorontsov
2010-06-07 19:44 ` Russell King - ARM Linux
2010-06-07 20:27   ` Anton Vorontsov
2010-06-07 20:40     ` Nicolas Pitre
2010-06-07 21:35       ` Anton Vorontsov
2010-06-08 10:14         ` Catalin Marinas
2010-06-07 21:05     ` Catalin Marinas
2010-06-07 21:52       ` Russell King - ARM Linux
2010-06-08 10:04         ` Catalin Marinas
2010-06-08 10:26           ` Russell King - ARM Linux
2010-06-08 10:42             ` Catalin Marinas
2010-06-07 20:56   ` Catalin Marinas
2010-06-07 21:31     ` Anton Vorontsov [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=20100607213145.GA23421@oksana.dev.rtsoft.ru \
    --to=cbouatmailru@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 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).