From 2d37f94a28170ca656438758fca577acb49a7932 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 22 Oct 2007 11:24:24 +1000 Subject: 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 Acked-by: Jes Sorensen --- drivers/lguest/hypercalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/lguest/hypercalls.c') diff --git a/drivers/lguest/hypercalls.c b/drivers/lguest/hypercalls.c index 3a53788..9d5184c 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) char msg[128]; /* If the lgread fails, it will call kill_guest() itself; the * kill_guest() with the message will be ignored. */ - lgread(lg, msg, args->arg1, sizeof(msg)); + __lgread(lg, msg, args->arg1, sizeof(msg)); msg[sizeof(msg)-1] = '\0'; kill_guest(lg, "CRASH: %s", msg); break; -- cgit v1.1