[Lguest] [patch] introduce lgread_ulong/lgwrite_ulong for pointer read/write

Jes Sorensen jes at sgi.com
Wed Sep 26 22:57:59 EST 2007


Rusty Russell wrote:
> ===
> Jes complains that page table code still uses lgread_u32 even though
> it now uses general kernel pte types.  The best thing to do is to
> generalize lgread_u32 and lgwrite_u32.
> 
> This means we lose the efficiency of getuser().  We could potentially
> regain it if we used __copy_from_user instead of copy_from_user, but
> I'm not certain that our range check is equivalent to access_ok() on
> all platforms.
> 
> Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

I like this approach, if really fanatic about it you can even add more
compile time evaluation to get back the get_user(), but I am not
convinced it's worth the effort at this point.

I agree with Avi as well, but until we get to PAE support, lets just do
it this way.

Acked-by: Jes Sorensen <jes at sgi.com>

Cheers,
Jes



More information about the Lguest mailing list