aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest/x86
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2007-10-21 21:03:35 -0400
committerRusty Russell <rusty@rustcorp.com.au>2007-10-23 01:49:53 -0400
commitc18acd73ffc209def08003a1927473096f66c5ad (patch)
treedd8e292ac8ca90b061b7e37ad6947231ced566e3 /drivers/lguest/x86
parentee3db0f2b6053b65f3b70253f5f810d9a3d67b28 (diff)
Allow guest to specify syscall vector to use.
(Based on Ron Minnich's LGUEST_PLAN9_SYSCALL patch). This patch allows Guests to specify what system call vector they want, and we try to reserve it. We only allow one non-Linux system call vector, to try to avoid DoS on the Host. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/x86')
-rw-r--r--drivers/lguest/x86/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c
index 84c09082f27..a125109446d 100644
--- a/drivers/lguest/x86/core.c
+++ b/drivers/lguest/x86/core.c
@@ -530,6 +530,10 @@ int lguest_arch_init_hypercalls(struct lguest *lg)
530 if (put_user(tsc_speed, &lg->lguest_data->tsc_khz)) 530 if (put_user(tsc_speed, &lg->lguest_data->tsc_khz))
531 return -EFAULT; 531 return -EFAULT;
532 532
533 /* The interrupt code might not like the system call vector. */
534 if (!check_syscall_vector(lg))
535 kill_guest(lg, "bad syscall vector");
536
533 return 0; 537 return 0;
534} 538}
535/* Now we've examined the hypercall code; our Guest can make requests. There 539/* Now we've examined the hypercall code; our Guest can make requests. There