[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-4.0-testing] KEXEC: fix kexec_get_range_compat to fail vocally.
# HG changeset patch # User Andrew Cooper <andrew.cooper3@xxxxxxxxxx> # Date 1331110557 0 # Node ID fef96d88043052964759a2c00d042af071588b59 # Parent 32dbcf7567eae5cd6dc927bcce6b00cfcd5e9b18 KEXEC: fix kexec_get_range_compat to fail vocally. Fail with -ERANGE rather than silently truncating 64bit values (a physical address and size) into 32bit integers for dom0 to consume. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Simplify the bitwise arithmetic a bit. Signed-off-by: Keir Fraser <keir@xxxxxxx> xen-unstable changeset: 24358:9961a6d5356a xen-unstable date: Mon Dec 05 19:42:46 2011 +0000 --- diff -r 32dbcf7567ea -r fef96d880430 xen/common/kexec.c --- a/xen/common/kexec.c Wed Mar 07 08:54:24 2012 +0000 +++ b/xen/common/kexec.c Wed Mar 07 08:55:57 2012 +0000 @@ -295,6 +295,10 @@ ret = kexec_get_range_internal(&range); + /* Dont silently truncate physical addresses or sizes. */ + if ( (range.start | range.size) & ~(unsigned long)(~0u) ) + return -ERANGE; + if ( ret == 0 ) { XLAT_kexec_range(&compat_range, &range); if ( unlikely(copy_to_guest(uarg, &compat_range, 1)) ) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |