[HVM] MAke HVM hypercall table NR_hypercalls entries big.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 7 Nov 2006 09:35:57 +0000 (09:35 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 7 Nov 2006 09:35:57 +0000 (09:35 +0000)
Otherwise a buggy/malicious HVM guest can cause us to read
off the end of the table.
Signed-off-by: George Dunlap <gdunlap@xensource.com>
xen/arch/x86/hvm/hvm.c

index be4ef35ce67432449d979eb0a44819e9eb98305f..51a0161f62a1019bf9f56297846733aa0630eaed 100644 (file)
@@ -401,7 +401,7 @@ typedef unsigned long hvm_hypercall_t(
 
 #if defined(__i386__)
 
-static hvm_hypercall_t *hvm_hypercall_table[] = {
+static hvm_hypercall_t *hvm_hypercall_table[NR_hypercalls] = {
     HYPERCALL(memory_op),
     HYPERCALL(multicall),
     HYPERCALL(xen_version),