All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: linux-arch@vger.kernel.org, William Lee Irwin III <wli@holomorphy.com>
Subject: Re: [PATCH: x86] Add dma_mmap_coherent()
Date: Sun, 28 Mar 2004 12:35:56 +0100	[thread overview]
Message-ID: <20040328123556.E2825@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20040328112216.B2825@flint.arm.linux.org.uk>; from rmk@arm.linux.org.uk on Sun, Mar 28, 2004 at 11:22:16AM +0100

On Sun, Mar 28, 2004 at 11:22:16AM +0100, Russell King wrote:
> This has only been compile tested.  There are two changes here:
> 
> 1. ensure that we zero the whole page - otherwise we may expose leak
>    kernel data to userspace in the remainder of the last page.
> 2. add dma_mmap_coherent().  I've added checks for the offset and
>    size to ensure that we don't do anything silly (like mapping more
>    memory than the original coherent allocation covered.)  Maybe this
>    is something that remap_page_range() should be doing anyway?

Actually, there is a problem with this patch as it stands - get_free_pages
returns kernel pages, and remap_page_range() won't touch them without
the pages being marked reserved.  I'm also led to believe that splitting
a struct page up into is constituent struct pages is no longer valid, so
exactly how we do that is open to question.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

  parent reply	other threads:[~2004-03-28 11:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-28 10:22 [PATCH: x86] Add dma_mmap_coherent() Russell King
2004-03-28 10:40 ` [PATCH: ARM] " Russell King
2004-03-28 11:35 ` Russell King [this message]
2004-03-28 11:40   ` [PATCH: x86] " William Lee Irwin III
2004-03-28 12:36     ` Russell King
2004-03-28 12:51       ` William Lee Irwin III
2004-03-28 13:19       ` Russell King

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=20040328123556.E2825@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=linux-arch@vger.kernel.org \
    --cc=wli@holomorphy.com \
    /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.