lkml.org 
[lkml]   [1999]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Kernel hacking ? - Can this be done?
From
Date
In article <19990730200645.A351@loth.demon.co.uk> you wrote:
> On Fri, Jul 30, 1999 at 08:31:44AM +0200, Arjan van de Ven wrote:

>> SK> sys_read calls the the filesystem's read function, which uses
>> SK> copy_to_user (since it assumes it is invoked from user space through
>> SK> a system call).
>>
>> See the "set_fs" stuff in kHTTPd.

> Does that mean you're doing a kernel space -> kernel space copy?

Yes.

> Couldn't you just nick the data straight from the page cache?

That is possible too, in fact, I am adding this to kHTTPd right now. For
non-performance critical tasks, this is WAY to much pain though, since this
will only work for most filesystems (the f_ops->read works for ALL sane
filesystems), and proper locking isn't easy either.

Greetings,
Arjan van de Ven

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.050 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site