From: "Bryan O'Sullivan" <bos@pathscale.com>
To: Andi Kleen <ak@suse.de>
Cc: Matt Mackall <mpm@selenic.com>, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC] [PATCH] Add memcpy32 function
Date: Wed, 28 Dec 2005 07:00:25 -0800 [thread overview]
Message-ID: <1135782025.1527.104.camel@serpentine.pathscale.com> (raw)
In-Reply-To: <p73fyodmqn6.fsf@verdi.suse.de>
On Wed, 2005-12-28 at 12:01 +0100, Andi Kleen wrote:
> What irritates me is that the original author said this copy
> would happen from user space in ipath.
I'm afraid there may have been some miscommunication there.
All of our uses of memcpy_toio32 (which uses memcpy32 on x86_64) copy
from kernel virtual addresses to MMIO space. There's no direct copying
from userspace to MMIO space through the driver.
However, we do let userspace code directly access portions of our chip.
That code uses a routine that is exactly the same as memcpy32 to perform
MMIO writes. That's where I think the confusion arose on the part of
whoever responded to you.
> In that case you would need
> exception handling for all memory accesses to return EFAULT,
> otherwise everybody can crash the kernel.
Just to be clear: we use copy_{to,from}_user for all copies between
userspace and driver, and we return -EFAULT on short copies, so we're
already doing the right thing in that sort of case.
Sorry for the confusion. I hope this clears that business up.
<b
next prev parent reply other threads:[~2005-12-28 15:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-23 1:35 Bryan O'Sullivan
2005-12-23 2:49 ` Dave Jones
2005-12-23 17:16 ` Matt Mackall
2005-12-23 17:42 ` Christoph Hellwig
2005-12-23 18:14 ` Matt Mackall
2005-12-23 23:50 ` Bryan O'Sullivan
2005-12-28 11:01 ` Andi Kleen
2005-12-28 15:00 ` Bryan O'Sullivan [this message]
2005-12-28 17:50 ` Andreas Kleen
2005-12-28 18:11 ` Bryan O'Sullivan
2005-12-28 18:22 ` Andreas Kleen
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=1135782025.1527.104.camel@serpentine.pathscale.com \
--to=bos@pathscale.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome