aboutsummaryrefslogtreecommitdiffstats
path: root/.gitignore
diff options
context:
space:
mode:
authorAravindh Puthiyaparambil <aravindh@virtuata.com>2012-04-24 14:31:36 +0100
committerAravindh Puthiyaparambil <aravindh@virtuata.com>2012-04-24 14:31:36 +0100
commit8a2a58e21e8f6f85841b6d8b85acb782f1c39e0b (patch)
tree4f013c979bb16f5788f5fbf553e77865967682e1 /.gitignore
parentc9cca66b8db632792f062f5ff50b1ca301dbeae4 (diff)
downloadxen-8a2a58e21e8f6f85841b6d8b85acb782f1c39e0b.tar.gz
xen-8a2a58e21e8f6f85841b6d8b85acb782f1c39e0b.tar.bz2
xen-8a2a58e21e8f6f85841b6d8b85acb782f1c39e0b.zip
libxc: Replace alloca() with mmap() for large array sizes
Replace alloca() with mmap() for array sizes greater than a page in xc_linux_osdep.c. When mapping in large amounts of pages (in the GB range) from a guest in to Dom0 using xc_map_foreign_bulk(), a segfault occurs in the libxc client application. This is because the pfn array in linux_privcmd_map_foreign_bulk() is being allocated using alloca() and the subsequent memcpy causes the stack to blow. This patch replaces the alloca() with mmap() for pfn array sizes greater than a page. Fix an error print with the correct function name. Do the same for the map array in linux_gnttab_grant_map() Signed-off-by: Aravindh Puthiyaparambil <aravindh@virtuata.com> Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions