Re: Copy large memory regions from & to userspace

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Clemens Kolbitsch
Date: Friday, August 31, 2007 - 6:45 am

On Friday 31 August 2007 15:25:40 you wrote:

no... I'm copying user-memory to user-memory, not kernel-to-user, however 
running the code in kernel-mode.

what i wanted to know is how to check the access-rights...
i didn't get any other answers, so for now i'm just using 

if (access_ok(VERIFY_READ, from, PAGE_SIZE) &&
    access_ok(VERIFY_WRITE, to, PAGE_SIZE))
{
    memcpy(to, from, PAGE_SIZE);
}

and hope that this is the *correct* way to do it...

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Copy large memory regions from & to userspace, Clemens Kolbitsch, (Fri Aug 31, 6:45 am)