diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-21 21:24:24 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-23 01:49:56 -0400 |
commit | 2d37f94a28170ca656438758fca577acb49a7932 (patch) | |
tree | 21049219a98d314a2c442293e512b74d879e6270 /drivers/lguest/hypercalls.c | |
parent | 56ae43dfe233323683248a5c553bad7160db2fa5 (diff) |
generalize lgread_u32/lgwrite_u32.
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@rustcorp.com.au>
Acked-by: Jes Sorensen <jes@sgi.com>
Diffstat (limited to 'drivers/lguest/hypercalls.c')
-rw-r--r-- | drivers/lguest/hypercalls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/lguest/hypercalls.c b/drivers/lguest/hypercalls.c index 3a53788ba450..9d5184c7c14a 100644 --- a/drivers/lguest/hypercalls.c +++ b/drivers/lguest/hypercalls.c | |||
@@ -47,7 +47,7 @@ static void do_hcall(struct lguest *lg, struct hcall_args *args) | |||
47 | char msg[128]; | 47 | char msg[128]; |
48 | /* If the lgread fails, it will call kill_guest() itself; the | 48 | /* If the lgread fails, it will call kill_guest() itself; the |
49 | * kill_guest() with the message will be ignored. */ | 49 | * kill_guest() with the message will be ignored. */ |
50 | lgread(lg, msg, args->arg1, sizeof(msg)); | 50 | __lgread(lg, msg, args->arg1, sizeof(msg)); |
51 | msg[sizeof(msg)-1] = '\0'; | 51 | msg[sizeof(msg)-1] = '\0'; |
52 | kill_guest(lg, "CRASH: %s", msg); | 52 | kill_guest(lg, "CRASH: %s", msg); |
53 | break; | 53 | break; |