2009-11-05 04:56:27 +01:00
|
|
|
Index: src/lxc/lxc_container.c
|
2009-01-29 01:42:42 +01:00
|
|
|
===================================================================
|
2009-11-05 04:56:27 +01:00
|
|
|
--- src/lxc/lxc_container.c.orig
|
|
|
|
+++ src/lxc/lxc_container.c
|
2013-07-30 22:33:47 +02:00
|
|
|
@@ -144,6 +144,7 @@ int lxcContainerHasReboot(void)
|
2013-02-25 19:49:59 +01:00
|
|
|
int cmd, v;
|
|
|
|
int status;
|
|
|
|
char *tmp;
|
|
|
|
+ int stacksize = getpagesize() * 4;
|
|
|
|
|
|
|
|
if (virFileReadAll("/proc/sys/kernel/ctrl-alt-del", 10, &buf) < 0)
|
|
|
|
return -1;
|
2013-07-30 22:33:47 +02:00
|
|
|
@@ -160,12 +161,19 @@ int lxcContainerHasReboot(void)
|
2013-02-25 19:49:59 +01:00
|
|
|
VIR_FREE(buf);
|
|
|
|
cmd = v ? LINUX_REBOOT_CMD_CAD_ON : LINUX_REBOOT_CMD_CAD_OFF;
|
|
|
|
|
2013-07-30 22:33:47 +02:00
|
|
|
- if (VIR_ALLOC_N(stack, getpagesize() * 4) < 0)
|
2013-02-25 19:49:59 +01:00
|
|
|
+#ifdef __ia64__
|
|
|
|
+ stacksize *= 2;
|
|
|
|
+#endif
|
2013-07-30 22:33:47 +02:00
|
|
|
+ if (VIR_ALLOC_N(stack, stacksize) < 0)
|
2013-02-25 19:49:59 +01:00
|
|
|
return -1;
|
|
|
|
|
|
|
|
- childStack = stack + (getpagesize() * 4);
|
|
|
|
+ childStack = stack + stacksize;
|
|
|
|
|
|
|
|
+#ifdef __ia64__
|
2013-07-30 22:33:47 +02:00
|
|
|
+ cpid = __clone2(lxcContainerRebootChild, childStack, stacksize, flags, &cmd);
|
2013-02-25 19:49:59 +01:00
|
|
|
+#else
|
|
|
|
cpid = clone(lxcContainerRebootChild, childStack, flags, &cmd);
|
|
|
|
+#endif
|
|
|
|
VIR_FREE(stack);
|
|
|
|
if (cpid < 0) {
|
|
|
|
virReportSystemError(errno, "%s",
|
- Update to libvirt 1.1.4
- Add support for AArch64 architecture
- Various improvements on test code and test driver
- Don't link virt-login-shell against libvirt.so
- Close all non-stdio FDs in virt-login-shell
- Only allow 'stderr' log output when running setuid
- Fix perms for virConnectDomainXML{To,From}Native
- Many incremental improvements and bug fixes, see
http://libvirt.org/news.html
- Drop upstream patches: e7f400a1-CVE-2013-4296.patch,
2dba0323-CVE-2013-4297.patch, db7a5688-CVE-2013-4311.patch,
e65667c0-CVE-2013-4311.patch, 922b7fda-CVE-2013-4311.patch,
e4697b92-CVE-2013-4311.patch, 8294aa0c-CVE-2013-4399.patch,
484cc321-fix-spice-migration.patch,
79552754-libvirtd-chardev-crash.patch,
57687fd6-CVE-2013-4401.patch, ae53e5d1-CVE-2013-4400.patch,
8c3586ea-CVE-2013-4400.patch, b7fcc799a-CVE-2013-4400.patch,
3e2f27e1-CVE-2013-4400.patch, 5a0ea4b7-CVE-2013-4400.patch,
843bdb2f-CVE-2013-4400.patch,
bd773e74-lxc-terminate-machine.patch,
e350826c-python-fix-fd-passing.patch
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=329
2013-11-20 21:02:26 +01:00
|
|
|
@@ -2034,7 +2042,11 @@ int lxcContainerStart(virDomainDefPtr de
|
2011-08-04 19:12:20 +02:00
|
|
|
cflags |= CLONE_NEWNET;
|
2010-03-22 17:06:05 +01:00
|
|
|
}
|
2008-10-26 00:53:14 +02:00
|
|
|
|
|
|
|
+#ifdef __ia64__
|
2013-07-30 22:33:47 +02:00
|
|
|
+ pid = __clone2(lxcContainerChild, stacktop, stacksize, cflags, &args);
|
2008-10-26 00:53:14 +02:00
|
|
|
+#else
|
2011-08-04 19:12:20 +02:00
|
|
|
pid = clone(lxcContainerChild, stacktop, cflags, &args);
|
2008-10-26 00:53:14 +02:00
|
|
|
+#endif
|
|
|
|
VIR_FREE(stack);
|
2011-03-31 22:22:32 +02:00
|
|
|
VIR_DEBUG("clone() completed, new container PID is %d", pid);
|
2008-10-26 00:53:14 +02:00
|
|
|
|
- Update to libvirt 1.1.4
- Add support for AArch64 architecture
- Various improvements on test code and test driver
- Don't link virt-login-shell against libvirt.so
- Close all non-stdio FDs in virt-login-shell
- Only allow 'stderr' log output when running setuid
- Fix perms for virConnectDomainXML{To,From}Native
- Many incremental improvements and bug fixes, see
http://libvirt.org/news.html
- Drop upstream patches: e7f400a1-CVE-2013-4296.patch,
2dba0323-CVE-2013-4297.patch, db7a5688-CVE-2013-4311.patch,
e65667c0-CVE-2013-4311.patch, 922b7fda-CVE-2013-4311.patch,
e4697b92-CVE-2013-4311.patch, 8294aa0c-CVE-2013-4399.patch,
484cc321-fix-spice-migration.patch,
79552754-libvirtd-chardev-crash.patch,
57687fd6-CVE-2013-4401.patch, ae53e5d1-CVE-2013-4400.patch,
8c3586ea-CVE-2013-4400.patch, b7fcc799a-CVE-2013-4400.patch,
3e2f27e1-CVE-2013-4400.patch, 5a0ea4b7-CVE-2013-4400.patch,
843bdb2f-CVE-2013-4400.patch,
bd773e74-lxc-terminate-machine.patch,
e350826c-python-fix-fd-passing.patch
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=329
2013-11-20 21:02:26 +01:00
|
|
|
@@ -2060,6 +2072,7 @@ int lxcContainerAvailable(int features)
|
2011-11-10 02:55:47 +01:00
|
|
|
int cpid;
|
2008-10-26 00:53:14 +02:00
|
|
|
char *childStack;
|
|
|
|
char *stack;
|
|
|
|
+ int stacksize = getpagesize() * 4;
|
|
|
|
|
2009-07-24 01:36:28 +02:00
|
|
|
if (features & LXC_CONTAINER_FEATURE_USER)
|
|
|
|
flags |= CLONE_NEWUSER;
|
- Update to libvirt 1.1.4
- Add support for AArch64 architecture
- Various improvements on test code and test driver
- Don't link virt-login-shell against libvirt.so
- Close all non-stdio FDs in virt-login-shell
- Only allow 'stderr' log output when running setuid
- Fix perms for virConnectDomainXML{To,From}Native
- Many incremental improvements and bug fixes, see
http://libvirt.org/news.html
- Drop upstream patches: e7f400a1-CVE-2013-4296.patch,
2dba0323-CVE-2013-4297.patch, db7a5688-CVE-2013-4311.patch,
e65667c0-CVE-2013-4311.patch, 922b7fda-CVE-2013-4311.patch,
e4697b92-CVE-2013-4311.patch, 8294aa0c-CVE-2013-4399.patch,
484cc321-fix-spice-migration.patch,
79552754-libvirtd-chardev-crash.patch,
57687fd6-CVE-2013-4401.patch, ae53e5d1-CVE-2013-4400.patch,
8c3586ea-CVE-2013-4400.patch, b7fcc799a-CVE-2013-4400.patch,
3e2f27e1-CVE-2013-4400.patch, 5a0ea4b7-CVE-2013-4400.patch,
843bdb2f-CVE-2013-4400.patch,
bd773e74-lxc-terminate-machine.patch,
e350826c-python-fix-fd-passing.patch
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=329
2013-11-20 21:02:26 +01:00
|
|
|
@@ -2067,14 +2080,21 @@ int lxcContainerAvailable(int features)
|
2008-10-26 00:53:14 +02:00
|
|
|
if (features & LXC_CONTAINER_FEATURE_NET)
|
|
|
|
flags |= CLONE_NEWNET;
|
|
|
|
|
|
|
|
- if (VIR_ALLOC_N(stack, getpagesize() * 4) < 0) {
|
|
|
|
+#ifdef __ia64__
|
|
|
|
+ stacksize *= 2;
|
|
|
|
+#endif
|
|
|
|
+ if (VIR_ALLOC_N(stack, stacksize) < 0) {
|
2011-06-02 20:32:33 +02:00
|
|
|
VIR_DEBUG("Unable to allocate stack");
|
2008-10-26 00:53:14 +02:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
- childStack = stack + (getpagesize() * 4);
|
|
|
|
+ childStack = stack + stacksize;
|
|
|
|
|
|
|
|
+#ifdef __ia64__
|
2013-07-30 22:33:47 +02:00
|
|
|
+ cpid = __clone2(lxcContainerDummyChild, childStack, stacksize, flags, NULL);
|
2008-10-26 00:53:14 +02:00
|
|
|
+#else
|
|
|
|
cpid = clone(lxcContainerDummyChild, childStack, flags, NULL);
|
|
|
|
+#endif
|
|
|
|
VIR_FREE(stack);
|
|
|
|
if (cpid < 0) {
|
2011-11-10 02:55:47 +01:00
|
|
|
char ebuf[1024] ATTRIBUTE_UNUSED;
|