X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fmemtrack.c;h=66c0c03fb5215d0a2bd73f34dfdcd777a35b8318;hb=9d346ee2cf8a7f2a79dc4929b8e0416de7d8f8c8;hp=367a47303ccba7462b4b853a4203636f774988db;hpb=4a3b35137e700165754d61c4e791c0a8e51c770c;p=palacios.git diff --git a/linux_module/memtrack.c b/linux_module/memtrack.c index 367a473..66c0c03 100644 --- a/linux_module/memtrack.c +++ b/linux_module/memtrack.c @@ -89,16 +89,17 @@ static int memtrack_snap(struct v3_guest *guest, header_size = (uint64_t)&(temp.core[0]) - (uint64_t)&temp; core_header_size = (uint64_t)&(ctemp.access_bitmap) - (uint64_t)&ctemp; - INFO("offset_to_num_cores=%llu header_size=%llu core_header_size=%llu\n", - offset_to_num_cores, header_size, core_header_size); + // INFO("offset_to_num_cores=%llu header_size=%llu core_header_size=%llu\n", + // offset_to_num_cores, header_size, core_header_size); if (copy_from_user(&num_cores,((void __user *)arg) + offset_to_num_cores,sizeof(num_cores))) { ERROR("palacios: cannot copy number of cores from user\n"); goto fail; } - INFO("num_cores=%u",num_cores); + //INFO("num_cores=%u",num_cores); + // overflow possible here, but only for an insane number of cores if (!(user_snap=palacios_alloc(sizeof(v3_mem_track_snapshot) + num_cores * sizeof(struct v3_core_mem_track)))) { ERROR("palacios: cannot allocate memory for copying user snapshot\n"); goto fail; @@ -116,8 +117,8 @@ static int memtrack_snap(struct v3_guest *guest, goto fail; } - INFO("snapshot: numcores=%u, core[0].num_pages=%llu, request_numcores=%u\n", - sys_snap->num_cores, sys_snap->core[0].num_pages, num_cores); + //INFO("snapshot: numcores=%u, core[0].num_pages=%llu, request_numcores=%u\n", + // sys_snap->num_cores, sys_snap->core[0].num_pages, num_cores); // Copy the meta data if (copy_to_user((void __user *)arg, sys_snap, header_size)) {