summaryrefslogtreecommitdiff
path: root/app-emulation/qemu/files
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/qemu/files')
-rw-r--r--app-emulation/qemu/files/qemu-1.7.0-cflags.patch11
-rw-r--r--app-emulation/qemu/files/qemu-9999-cflags.patch13
-rw-r--r--app-emulation/qemu/files/qemu-9999-virtfs-proxy-helper-accept.patch30
-rw-r--r--app-emulation/qemu/files/qemu_assert.patch30
4 files changed, 84 insertions, 0 deletions
diff --git a/app-emulation/qemu/files/qemu-1.7.0-cflags.patch b/app-emulation/qemu/files/qemu-1.7.0-cflags.patch
new file mode 100644
index 0000000..cd003f6
--- /dev/null
+++ b/app-emulation/qemu/files/qemu-1.7.0-cflags.patch
@@ -0,0 +1,11 @@
+--- a/configure
++++ b/configure
+@@ -3131,8 +3131,6 @@ fi
+ if test "$gcov" = "yes" ; then
+ CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
+ LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
+-elif test "$debug" = "no" ; then
+- CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
+ fi
+
+
diff --git a/app-emulation/qemu/files/qemu-9999-cflags.patch b/app-emulation/qemu/files/qemu-9999-cflags.patch
new file mode 100644
index 0000000..08a6c9f
--- /dev/null
+++ b/app-emulation/qemu/files/qemu-9999-cflags.patch
@@ -0,0 +1,13 @@
+diff --git a/configure b/configure
+index 82f6e71..7e19aaf 100755
+--- a/configure
++++ b/configure
+@@ -3131,8 +3131,6 @@ fi
+ if test "$gcov" = "yes" ; then
+ CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
+ LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
+-elif test "$debug" = "no" ; then
+- CFLAGS="-O2 -D_FORTIFY_SOURCE=2 $CFLAGS"
+ fi
+
+
diff --git a/app-emulation/qemu/files/qemu-9999-virtfs-proxy-helper-accept.patch b/app-emulation/qemu/files/qemu-9999-virtfs-proxy-helper-accept.patch
new file mode 100644
index 0000000..f8a5249
--- /dev/null
+++ b/app-emulation/qemu/files/qemu-9999-virtfs-proxy-helper-accept.patch
@@ -0,0 +1,30 @@
+From c5970614489e385e69667f1f323421442a7a46c0 Mon Sep 17 00:00:00 2001
+From: Tim Comer <comer0@gmail.com>
+Date: Sat, 19 Apr 2014 12:51:42 -0400
+Subject: [PATCH] virtfs-proxy-helper: fix call to accept
+
+The current code calls accept() without initializing the size parameter
+which means the accept call might write too much to the stack.
+
+URL: https://bugs.gentoo.org/486714
+Signed-off-by: Tim Comer <comer0@gmail.com>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ fsdev/virtfs-proxy-helper.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
+index bfecb87..cd291d3 100644
+--- a/fsdev/virtfs-proxy-helper.c
++++ b/fsdev/virtfs-proxy-helper.c
+@@ -760,6 +760,7 @@ static int proxy_socket(const char *path, uid_t uid, gid_t gid)
+ return -1;
+ }
+
++ size = sizeof(qemu);
+ client = accept(sock, (struct sockaddr *)&qemu, &size);
+ if (client < 0) {
+ do_perror("accept");
+--
+1.9.2
+
diff --git a/app-emulation/qemu/files/qemu_assert.patch b/app-emulation/qemu/files/qemu_assert.patch
new file mode 100644
index 0000000..4ab07e3
--- /dev/null
+++ b/app-emulation/qemu/files/qemu_assert.patch
@@ -0,0 +1,30 @@
+diff -Naur qemu/util/qemu-option.c qemu2/util/qemu-option.c
+--- qemu/util/qemu-option.c 2014-12-26 02:07:22.787822010 +0300
++++ qemu2/util/qemu-option.c 2014-12-26 02:06:50.000000000 +0300
+@@ -384,7 +384,7 @@
+ }
+ return ret;
+ }
+- assert(opt->desc && opt->desc->type == QEMU_OPT_BOOL);
++// assert(opt->desc && opt->desc->type == QEMU_OPT_BOOL);
+ ret = opt->value.boolean;
+ if (del) {
+ qemu_opt_del_all(opts, name);
+@@ -420,7 +420,7 @@
+ }
+ return ret;
+ }
+- assert(opt->desc && opt->desc->type == QEMU_OPT_NUMBER);
++// assert(opt->desc && opt->desc->type == QEMU_OPT_NUMBER);
+ ret = opt->value.uint;
+ if (del) {
+ qemu_opt_del_all(opts, name);
+@@ -457,7 +457,7 @@
+ }
+ return ret;
+ }
+- assert(opt->desc && opt->desc->type == QEMU_OPT_SIZE);
++// assert(opt->desc && opt->desc->type == QEMU_OPT_SIZE);
+ ret = opt->value.uint;
+ if (del) {
+ qemu_opt_del_all(opts, name);