mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-03 04:45:46 +00:00
11b767d110
When spawning a new container (via clone()) we allocate stack for lxcContainerChild(). So far, we allocate 4 pages for the stack and this used to be enough until we started rewriting everything to glib. With glib we switched to g_strerror() which localizes errno strings and thus increases stack usage, while the previously used strerror_r() was more compact. Fortunately, the solution is easy - just increase how much stack the child can use (16 pages ought to be enough for anybody). And while at it, lets use mmap() for allocation which offer some nice features: MAP_STACK - align allocation to be suitable for stack (even though, currently ignored on Linux), MAP_GROWSDOWN - kernel guards out of bounds access from child Resolves: https://gitlab.com/libvirt/libvirt/-/issues/511 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com> |
||
---|---|---|
.. | ||
libvirtd_lxc.aug | ||
lxc_cgroup.c | ||
lxc_cgroup.h | ||
lxc_conf.c | ||
lxc_conf.h | ||
lxc_container.c | ||
lxc_container.h | ||
lxc_controller.c | ||
lxc_domain.c | ||
lxc_domain.h | ||
lxc_driver.c | ||
lxc_driver.h | ||
lxc_fuse.c | ||
lxc_fuse.h | ||
lxc_hostdev.c | ||
lxc_hostdev.h | ||
lxc_monitor_protocol.x | ||
lxc_monitor.c | ||
lxc_monitor.h | ||
lxc_native.c | ||
lxc_native.h | ||
lxc_process.c | ||
lxc_process.h | ||
lxc.conf | ||
meson.build | ||
test_libvirtd_lxc.aug.in | ||
virtlxcd.init.in | ||
virtlxcd.service.in |