All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/4] ARM: cacheflush: don't bother rounding to nearest vma
Date: Fri, 24 May 2013 12:59:17 +0100	[thread overview]
Message-ID: <20130524115917.GY18614@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1369395087-30972-5-git-send-email-will.deacon@arm.com>

On Fri, May 24, 2013 at 12:31:27PM +0100, Will Deacon wrote:
> do_cache_op finds the lowest VMA contained in the specified address
> range and rounds the range to cover only the mapped addresses.
> 
> Since commit 4542b6a0fa6b ("ARM: 7365/1: drop unused parameter from
> flush_cache_user_range") the VMA is not used for anything else in this
> code and seeing as the low-level cache flushing routines return -EFAULT
> if the address is not valid, there is no need for this range truncation.
> 
> This patch removes the VMA handling code from the cacheflushing syscall.

The only thing which access_ok() tells you is that the addresses are
_potentially_ valid user addresses.  That's not what the VMA check is
there for.

That check is there to make sure userspace doesn't do something idiotic,
and to keep the use of this API limited to specific actions such as self
modifying code, and not a general purpose cache flushing API covering
multiple VMAs.

  reply	other threads:[~2013-05-24 11:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-24 11:31 [PATCH v2 0/4] Optimise cache-flushing system call Will Deacon
2013-05-24 11:31 ` [PATCH v2 1/4] ARM: entry: allow ARM-private syscalls to be restarted Will Deacon
2013-05-24 11:31 ` [PATCH v2 2/4] ARM: cacheflush: split user cache-flushing into interruptible chunks Will Deacon
2013-05-24 11:31 ` [PATCH v2 3/4] ARM: cacheflush: don't round address range up to nearest page Will Deacon
2013-05-24 11:31 ` [PATCH v2 4/4] ARM: cacheflush: don't bother rounding to nearest vma Will Deacon
2013-05-24 11:59   ` Russell King - ARM Linux [this message]
2013-05-24 12:56     ` 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=20130524115917.GY18614@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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.