libvirt/src/lxc
Michal Privoznik 11b767d110 lxc_container: Increase stack size for lxcContainerChild()
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>
2023-08-08 07:37:34 +02:00
..
libvirtd_lxc.aug
lxc_cgroup.c lxc: Update format strings in translated messages 2023-04-01 11:40:33 +02:00
lxc_cgroup.h
lxc_conf.c
lxc_conf.h
lxc_container.c lxc_container: Increase stack size for lxcContainerChild() 2023-08-08 07:37:34 +02:00
lxc_container.h
lxc_controller.c virLXCControllerSetupUsernsMap: Modify debug logging for clean startup errors 2023-08-04 10:04:21 +02:00
lxc_domain.c lib: use struct zero initializer instead of memset 2023-08-03 16:41:19 +02:00
lxc_domain.h
lxc_driver.c lib: use struct zero initializer instead of memset 2023-08-03 16:41:19 +02:00
lxc_driver.h
lxc_fuse.c Revert "lxc_fuse: Tell FUSE that /proc/meminfo is nonseekable" 2023-06-29 15:21:00 +02:00
lxc_fuse.h
lxc_hostdev.c lxc: Fix access to hostdev capabilities 2023-04-25 11:00:57 +02:00
lxc_hostdev.h
lxc_monitor_protocol.x
lxc_monitor.c
lxc_monitor.h
lxc_native.c lxc: Make lxcCreateHostdevDef() less versatile 2023-04-25 11:00:57 +02:00
lxc_native.h
lxc_process.c virLXCProcessReportStartupLogError: Strip trailing newline from error 2023-08-04 10:04:21 +02:00
lxc_process.h
lxc.conf
meson.build
test_libvirtd_lxc.aug.in
virtlxcd.init.in
virtlxcd.service.in src: fix max file limits in systemd services 2023-08-04 13:00:52 +01:00