mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martijn van Oosterhout <kleptog@svana.org>
To: KrnlUsr <kdp102@yahoo.com>
Cc: linux-kernel@vger.kernel.org, linux-net@vger.kernel.org
Subject: Re: copy_from_user, copy_to_user in kernel
Date: Fri, 12 Aug 2005 22:35:57 +0200	[thread overview]
Message-ID: <20050812203552.GG4305@svana.org> (raw)
In-Reply-To: <20050812181623.6814.qmail@web80214.mail.yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 873 bytes --]

On Fri, Aug 12, 2005 at 11:16:23AM -0700, KrnlUsr wrote:
> Hi
> 
> Why does copy_from/to_user routines fail if both
> source and destination are in kernel space. I have a
> kernel module that:

I had this problem when writing a kernel module that was using a UDP
socket to send and receive stuff. It would work fine in UML but fail in
the real kernel. I never worked it out but someone later patched it by
using the [gs]et_[df]s() functions. If you grep the kernel source you
can see a lot of places use it. The problem is I still have no idea why
it works...

Hope this helps,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

  parent reply	other threads:[~2005-08-12 20:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-12 18:16 KrnlUsr
2005-08-12 18:29 ` John W. Linville
2005-08-12 20:35 ` Martijn van Oosterhout [this message]
2005-08-12 23:50   ` Steven Rostedt

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=20050812203552.GG4305@svana.org \
    --to=kleptog@svana.org \
    --cc=kdp102@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.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

Powered by JetHome