lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200708311545.29154.clemens.kol@gmx.at>
Date:	Fri, 31 Aug 2007 15:45:28 +0200
From:	Clemens Kolbitsch <clemens.kol@....at>
To:	"Chris Smith" <smitty1elkml@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: Copy large memory regions from & to userspace

On Friday 31 August 2007 15:25:40 you wrote:
> On 8/30/07, Clemens Kolbitsch <clemens.kol@....at> wrote:
> > Hi!
> > Just a short question: What is the correct method of copying large areas
> > of memory from userspace into userspace when running in kernel-mode?
>
> relayfs?

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...

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ