mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
gnttab: don't silently truncate GFNs in compat setup-table handling
Returning back truncated frame numbers is unhelpful: Quite likely they're not owned by the domain (if it's PV), or we may misguide the guest into writing grant entries into a page that it actually uses for other purposes. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
3ea18e9e26
commit
1043dfb165
1 file changed
+6
-1
@@ -176,7 +176,12 @@ int compat_grant_table_op(
|
||||
{ \
|
||||
for ( i = 0; i < (_s_)->nr_frames; ++i ) \
|
||||
{ \
|
||||
unsigned int frame = (_s_)->frame_list.p[i]; \
|
||||
compat_pfn_t frame = (_s_)->frame_list.p[i]; \
|
||||
if ( frame != (_s_)->frame_list.p[i] ) \
|
||||
{ \
|
||||
(_s_)->status = GNTST_address_too_big; \
|
||||
break; \
|
||||
} \
|
||||
if ( __copy_to_compat_offset((_d_)->frame_list, \
|
||||
i, &frame, 1) ) \
|
||||
{ \
|
||||
|
||||