linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] mmaping with VIVT cache
Date: Fri, 17 Sep 2010 00:05:40 +0100	[thread overview]
Message-ID: <20100916230540.GA30916@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <831453.93557.qm@web120220.mail.ne1.yahoo.com>

On Wed, Sep 15, 2010 at 05:25:38PM -0700, P F wrote:
> The mmap'd buffer is allocated by vmalloc_32(), and later mapped with
> vmalloc_to_page()/vm_insert_page().  The DMA'd buffer is allocated by
> usb_buffer_alloc().  At the appropriate time, the DMA'd buffer is
> memcpy()'d into the mmap'd buffer, and userspace is allowed to handle it,
> at which point it is corrupt.

Ah, that's slightly different as you're not talking about the DMA buffers
themselves.

However, anyone who is not familiar with VIVT or aliasing VIPT caches is
going to be caught out by this sort of thing (which basically means most
ARMs, and at least some PA-RISC.)

I don't think we have any APIs in the kernel to handle aliasing between
the vmalloc space and userspace...

  reply	other threads:[~2010-09-16 23:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16  0:25 [RFC] mmaping with VIVT cache P F
2010-09-16 23:05 ` Russell King - ARM Linux [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-09-17 19:07 P F
2010-09-17 21:06 ` Russell King - ARM Linux
2010-09-20 10:38   ` Pawel Moll
2010-09-20 10:50     ` Russell King - ARM Linux
2010-09-20 11:31       ` Pawel Moll
2010-09-13 19:58 P F
2010-09-14 23:50 ` Russell King - ARM Linux
2010-09-15  1:06   ` Eric Miao
2010-09-15  7:31     ` Russell King - ARM Linux
2010-09-15  7:37       ` Eric Miao

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=20100916230540.GA30916@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 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).