summaryrefslogtreecommitdiffstats
path: root/recipes-extended/xen/files
diff options
context:
space:
mode:
authorChristopher Clark <christopher.w.clark@gmail.com>2018-07-31 12:35:48 -0700
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-08-02 22:57:14 -0400
commitf7a0b0183ec7e78557433d58b5592c29a9a82700 (patch)
tree43873009c0809a7e7b3a0a2e3cb9f51470ab17c8 /recipes-extended/xen/files
parentc91d3dca725f703815dbf4fbdd83bdc70ef60686 (diff)
downloadmeta-virtualization-f7a0b0183ec7e78557433d58b5592c29a9a82700.tar.gz
xen: remove 4.10.1 recipe and patches no longer required
Signed-off-by: Christopher Clark <christopher.clark6@baesystem.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-extended/xen/files')
-rw-r--r--recipes-extended/xen/files/shim-don-t-let-build-modify-shim.config.patch47
-rw-r--r--recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch41
-rw-r--r--recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part1.patch47
-rw-r--r--recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part2.patch52
-rw-r--r--recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch44
-rw-r--r--recipes-extended/xen/files/tools-misc-fix-hypothetical-buffer-overflow.patch46
-rw-r--r--recipes-extended/xen/files/tools-xenpmd-fix-possible-0-truncation.patch74
7 files changed, 0 insertions, 351 deletions
diff --git a/recipes-extended/xen/files/shim-don-t-let-build-modify-shim.config.patch b/recipes-extended/xen/files/shim-don-t-let-build-modify-shim.config.patch
deleted file mode 100644
index 74035283..00000000
--- a/recipes-extended/xen/files/shim-don-t-let-build-modify-shim.config.patch
+++ /dev/null
@@ -1,47 +0,0 @@
1From 8717e7417cebeae162fd61ea4cbdcdd422748f08 Mon Sep 17 00:00:00 2001
2From: Juergen Gross <jgross@suse.com>
3Date: Fri, 20 Apr 2018 17:47:55 +0200
4Subject: [PATCH] shim: don't let build modify shim.config
5
6Currently building the shim will modify shim.config in case some config
7option was added or modified in the hypervisor.
8
9Avoid that by copying shim.config to an intermediate file instead.
10
11Signed-off-by: Juergen Gross <jgross@suse.com>
12Reviewed-by: Jan Beulich <jbeulich@suse.com>
13Acked-by: Wei Liu <wei.liu2@citrix.com>
14---
15 tools/firmware/xen-dir/Makefile | 16 ++++++----------
16 1 file changed, 6 insertions(+), 10 deletions(-)
17
18diff --git a/tools/firmware/xen-dir/Makefile b/tools/firmware/xen-dir/Makefile
19index a7e69ae..84648c3 100644
20--- a/tools/firmware/xen-dir/Makefile
21+++ b/tools/firmware/xen-dir/Makefile
22@@ -41,16 +41,12 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE
23 $(D): linkfarm.stamp
24 $(MAKE) -C $(D)/xen distclean
25
26-.PHONY: shim-%config
27-shim-%config: $(D) FORCE
28- $(MAKE) -C $(D)/xen $*config \
29- XEN_CONFIG_EXPERT=y \
30- KCONFIG_CONFIG=$(CURDIR)/shim.config
31-
32-xen-shim: $(D) shim-olddefconfig
33- $(MAKE) -C $(D)/xen build \
34- XEN_CONFIG_EXPERT=y \
35- KCONFIG_CONFIG=$(CURDIR)/shim.config
36+$(D)/xen/.config: shim.config $(D)
37+ cp $< $@
38+ $(MAKE) -C $(@D) olddefconfig XEN_CONFIG_EXPERT=y
39+
40+xen-shim: $(D)/xen/.config
41+ $(MAKE) -C $(<D) build XEN_CONFIG_EXPERT=y
42 ln -sf $(D)/xen/xen $@
43 ln -sf $(D)/xen/xen-syms $@-syms
44
45--
462.7.4
47
diff --git a/recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch b/recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch
deleted file mode 100644
index 2896d9f2..00000000
--- a/recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1From 7f601f7c341c80d554615556d60e3b8ed1e5ad4f Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
3 <marmarek@invisiblethingslab.com>
4Date: Thu, 5 Apr 2018 03:50:54 +0200
5Subject: [PATCH] tools/gdbsx: fix -Wstringop-truncation warning
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10gcc-8 complains:
11
12 gx_main.c: In function 'prepare_stop_reply':
13 gx_main.c:385:9: error: 'strncpy' output truncated before terminating nul copying 6 bytes from a string of the same length [-Werror=stringop-truncation]
14 strncpy(buf, "watch:", 6);
15 ^~~~~~~~~~~~~~~~~~~~~~~~~
16
17Since terminating '\0' isn't needed here at all, switch to memcpy.
18
19Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
20Acked-by: Wei Liu <wei.liu2@citrix.com>
21Release-Acked-by: Juergen Gross <jgross@suse.com>
22---
23 tools/debugger/gdbsx/gx/gx_main.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26diff --git a/tools/debugger/gdbsx/gx/gx_main.c b/tools/debugger/gdbsx/gx/gx_main.c
27index a908c45..6dfa501 100644
28--- a/tools/debugger/gdbsx/gx/gx_main.c
29+++ b/tools/debugger/gdbsx/gx/gx_main.c
30@@ -382,7 +382,7 @@ prepare_stop_reply(enum target_signal sig, char *buf, vcpuid_t vcpu)
31
32 /* TBD: check if we stopped because of watchpoint */
33 if (watchpoint_stop()) {
34- strncpy(buf, "watch:", 6);
35+ memcpy(buf, "watch:", 6);
36 buf += 6;
37 /* TBD: **/
38 }
39--
402.7.4
41
diff --git a/recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part1.patch b/recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part1.patch
deleted file mode 100644
index f94d22c5..00000000
--- a/recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part1.patch
+++ /dev/null
@@ -1,47 +0,0 @@
1From 437e00fea04becc91c1b6bc1c0baa636b067a5cc Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
3 <marmarek@invisiblethingslab.com>
4Date: Thu, 5 Apr 2018 03:50:55 +0200
5Subject: [PATCH] tools/kdd: mute spurious gcc warning
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10gcc-8 complains:
11
12 kdd.c:698:13: error: 'memcpy' offset [-204, -717] is out of the bounds [0, 216] of object 'ctrl' with type 'kdd_ctrl' {aka 'union <anonymous>'} [-Werror=array-bounds]
13 memcpy(buf, ((uint8_t *)&ctrl.c32) + offset, len);
14 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 kdd.c: In function 'kdd_select_callback':
16 kdd.c:642:14: note: 'ctrl' declared here
17 kdd_ctrl ctrl;
18 ^~~~
19
20But this is impossible - 'offset' is unsigned and correctly validated
21few lines before.
22
23Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
24Acked-by: Wei Liu <wei.liu2@citrix.com>
25Release-Acked-by: Juergen Gross <jgross@suse.com>
26---
27 tools/debugger/kdd/kdd.c | 3 +++
28 1 file changed, 3 insertions(+)
29
30diff --git a/tools/debugger/kdd/kdd.c b/tools/debugger/kdd/kdd.c
31index 1bd5dd5..61d769e 100644
32--- a/tools/debugger/kdd/kdd.c
33+++ b/tools/debugger/kdd/kdd.c
34@@ -695,7 +695,10 @@ static void kdd_handle_read_ctrl(kdd_state *s)
35 KDD_LOG(s, "Request outside of known control space\n");
36 len = 0;
37 } else {
38+#pragma GCC diagnostic push
39+#pragma GCC diagnostic ignored "-Warray-bounds"
40 memcpy(buf, ((uint8_t *)&ctrl.c32) + offset, len);
41+#pragma GCC diagnostic pop
42 }
43 }
44
45--
462.7.4
47
diff --git a/recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part2.patch b/recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part2.patch
deleted file mode 100644
index afd14231..00000000
--- a/recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part2.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1From 2de2b10b2252761baa5dd0077df384dbfcca8212 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
3 <marmarek@invisiblethingslab.com>
4Date: Tue, 22 May 2018 21:47:45 +0200
5Subject: [PATCH] tools/kdd: alternative way of muting spurious gcc warning
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10Older gcc does not support #pragma GCC diagnostics, so use alternative
11approach - change variable type to uint32_t (this code handle 32-bit
12requests only anyway), which apparently also avoid gcc complaining about
13this (otherwise correct) code.
14
15Fixes 437e00fea04becc91c1b6bc1c0baa636b067a5cc "tools/kdd: mute spurious
16gcc warning"
17
18Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
19Acked-by: Wei Liu <wei.liu2@citrix.com>
20Release-acked-by: Juergen Gross <jgross@suse.com>
21Acked-by: Tim Deegan <tim@xen.org>
22---
23 tools/debugger/kdd/kdd.c | 5 +----
24 1 file changed, 1 insertion(+), 4 deletions(-)
25
26diff --git a/tools/debugger/kdd/kdd.c b/tools/debugger/kdd/kdd.c
27index 61d769e..5a019a0 100644
28--- a/tools/debugger/kdd/kdd.c
29+++ b/tools/debugger/kdd/kdd.c
30@@ -687,7 +687,7 @@ static void kdd_handle_read_ctrl(kdd_state *s)
31 }
32 } else {
33 /* 32-bit control-register space starts at 0x[2]cc, for 84 bytes */
34- uint64_t offset = addr;
35+ uint32_t offset = addr;
36 if (offset > 0x200)
37 offset -= 0x200;
38 offset -= 0xcc;
39@@ -695,10 +695,7 @@ static void kdd_handle_read_ctrl(kdd_state *s)
40 KDD_LOG(s, "Request outside of known control space\n");
41 len = 0;
42 } else {
43-#pragma GCC diagnostic push
44-#pragma GCC diagnostic ignored "-Warray-bounds"
45 memcpy(buf, ((uint8_t *)&ctrl.c32) + offset, len);
46-#pragma GCC diagnostic pop
47 }
48 }
49
50--
512.7.4
52
diff --git a/recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch b/recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch
deleted file mode 100644
index 2d606cd3..00000000
--- a/recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From fa7789ef18bd2e716997937af71b2e4b5b00a159 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
3 <marmarek@invisiblethingslab.com>
4Date: Thu, 5 Apr 2018 03:50:49 +0200
5Subject: [PATCH] tools/libxc: fix strncpy size
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10gcc-8 warns about possible truncation of trailing '\0'.
11Final character is overridden by '\0' anyway, so don't bother to copy
12it.
13
14This fixes compile failure:
15
16 xc_pm.c: In function 'xc_set_cpufreq_gov':
17 xc_pm.c:308:5: error: 'strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation]
18 strncpy(scaling_governor, govname, CPUFREQ_NAME_LEN);
19 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 cc1: all warnings being treated as errors
21
22Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
23Acked-by: Wei Liu <wei.liu2@citrix.com>
24Release-Acked-by: Juergen Gross <jgross@suse.com>
25---
26 tools/libxc/xc_pm.c | 2 +-
27 1 file changed, 1 insertion(+), 1 deletion(-)
28
29diff --git a/tools/libxc/xc_pm.c b/tools/libxc/xc_pm.c
30index 67e2418..6f8d548 100644
31--- a/tools/libxc/xc_pm.c
32+++ b/tools/libxc/xc_pm.c
33@@ -305,7 +305,7 @@ int xc_set_cpufreq_gov(xc_interface *xch, int cpuid, char *govname)
34 sysctl.cmd = XEN_SYSCTL_pm_op;
35 sysctl.u.pm_op.cmd = SET_CPUFREQ_GOV;
36 sysctl.u.pm_op.cpuid = cpuid;
37- strncpy(scaling_governor, govname, CPUFREQ_NAME_LEN);
38+ strncpy(scaling_governor, govname, CPUFREQ_NAME_LEN - 1);
39 scaling_governor[CPUFREQ_NAME_LEN - 1] = '\0';
40
41 return xc_sysctl(xch, &sysctl);
42--
432.7.4
44
diff --git a/recipes-extended/xen/files/tools-misc-fix-hypothetical-buffer-overflow.patch b/recipes-extended/xen/files/tools-misc-fix-hypothetical-buffer-overflow.patch
deleted file mode 100644
index a4998619..00000000
--- a/recipes-extended/xen/files/tools-misc-fix-hypothetical-buffer-overflow.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From 27751d89248c8c5eef6d8b56eb8f7d2084145080 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
3 <marmarek@invisiblethingslab.com>
4Date: Thu, 5 Apr 2018 03:50:50 +0200
5Subject: [PATCH] tools/misc: fix hypothetical buffer overflow in xen-lowmemd
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10gcc-8 complains:
11
12 xen-lowmemd.c: In function 'handle_low_mem':
13 xen-lowmemd.c:80:55: error: '%s' directive output may be truncated writing up to 511 bytes into a region of size 489 [-Werror=format-truncation=]
14 snprintf(error, BUFSZ,"Failed to write target %s to xenstore", data);
15 ^~ ~~~~
16 xen-lowmemd.c:80:9: note: 'snprintf' output between 36 and 547 bytes into a destination of size 512
17 snprintf(error, BUFSZ,"Failed to write target %s to xenstore", data);
18 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19
20In practice it wouldn't happen, because 'data' contains string
21representation of 64-bit unsigned number (20 characters at most).
22But place a limit to mute gcc warning.
23
24Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
25Acked-by: Wei Liu <wei.liu2@citrix.com>
26Release-Acked-by: Juergen Gross <jgross@suse.com>
27---
28 tools/misc/xen-lowmemd.c | 2 +-
29 1 file changed, 1 insertion(+), 1 deletion(-)
30
31diff --git a/tools/misc/xen-lowmemd.c b/tools/misc/xen-lowmemd.c
32index 865a54c..79ad34c 100644
33--- a/tools/misc/xen-lowmemd.c
34+++ b/tools/misc/xen-lowmemd.c
35@@ -77,7 +77,7 @@ void handle_low_mem(void)
36 if (!xs_write(xs_handle, XBT_NULL,
37 "/local/domain/0/memory/target", data, strlen(data)))
38 {
39- snprintf(error, BUFSZ,"Failed to write target %s to xenstore", data);
40+ snprintf(error, BUFSZ,"Failed to write target %.24s to xenstore", data);
41 perror(error);
42 }
43 }
44--
452.7.4
46
diff --git a/recipes-extended/xen/files/tools-xenpmd-fix-possible-0-truncation.patch b/recipes-extended/xen/files/tools-xenpmd-fix-possible-0-truncation.patch
deleted file mode 100644
index 86a8e35f..00000000
--- a/recipes-extended/xen/files/tools-xenpmd-fix-possible-0-truncation.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From 938c8f53b1f80175c6f7a1399efdb984abb0cb8b Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
3 <marmarek@invisiblethingslab.com>
4Date: Thu, 5 Apr 2018 03:50:53 +0200
5Subject: [PATCH] tools/xenpmd: fix possible '\0' truncation
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10gcc-8 complains:
11 xenpmd.c:207:9: error: 'strncpy' specified bound 32 equals destination size [-Werror=stringop-truncation]
12 strncpy(info->oem_info, attrib_value, 32);
13 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 xenpmd.c:201:9: error: 'strncpy' specified bound 32 equals destination size [-Werror=stringop-truncation]
15 strncpy(info->battery_type, attrib_value, 32);
16 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 xenpmd.c:195:9: error: 'strncpy' specified bound 32 equals destination size [-Werror=stringop-truncation]
18 strncpy(info->serial_number, attrib_value, 32);
19 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 xenpmd.c:189:9: error: 'strncpy' specified bound 32 equals destination size [-Werror=stringop-truncation]
21 strncpy(info->model_number, attrib_value, 32);
22 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23
24Copy 31 chars, then make sure terminating '\0' is present. Those fields
25are passed to strlen and as '%s' for snprintf later.
26
27Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
28Acked-by: Wei Liu <wei.liu2@citrix.com>
29Release-Acked-by: Juergen Gross <jgross@suse.com>
30---
31 tools/xenpmd/xenpmd.c | 12 ++++++++----
32 1 file changed, 8 insertions(+), 4 deletions(-)
33
34diff --git a/tools/xenpmd/xenpmd.c b/tools/xenpmd/xenpmd.c
35index 689c8fd..56412a9 100644
36--- a/tools/xenpmd/xenpmd.c
37+++ b/tools/xenpmd/xenpmd.c
38@@ -186,25 +186,29 @@ void set_attribute_battery_info(char *attrib_name,
39
40 if ( strstr(attrib_name, "model number") )
41 {
42- strncpy(info->model_number, attrib_value, 32);
43+ strncpy(info->model_number, attrib_value, 31);
44+ info->model_number[31] = '\0';
45 return;
46 }
47
48 if ( strstr(attrib_name, "serial number") )
49 {
50- strncpy(info->serial_number, attrib_value, 32);
51+ strncpy(info->serial_number, attrib_value, 31);
52+ info->serial_number[31] = '\0';
53 return;
54 }
55
56 if ( strstr(attrib_name, "battery type") )
57 {
58- strncpy(info->battery_type, attrib_value, 32);
59+ strncpy(info->battery_type, attrib_value, 31);
60+ info->battery_type[31] = '\0';
61 return;
62 }
63
64 if ( strstr(attrib_name, "OEM info") )
65 {
66- strncpy(info->oem_info, attrib_value, 32);
67+ strncpy(info->oem_info, attrib_value, 31);
68+ info->oem_info[31] = '\0';
69 return;
70 }
71
72--
732.7.4
74