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>
This commit is contained in:
Christopher Clark 2018-07-31 12:35:48 -07:00 committed by Bruce Ashfield
parent c91d3dca72
commit f7a0b0183e
8 changed files with 0 additions and 370 deletions

View File

@ -1,47 +0,0 @@
From 8717e7417cebeae162fd61ea4cbdcdd422748f08 Mon Sep 17 00:00:00 2001
From: Juergen Gross <jgross@suse.com>
Date: Fri, 20 Apr 2018 17:47:55 +0200
Subject: [PATCH] shim: don't let build modify shim.config
Currently building the shim will modify shim.config in case some config
option was added or modified in the hypervisor.
Avoid that by copying shim.config to an intermediate file instead.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
tools/firmware/xen-dir/Makefile | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/tools/firmware/xen-dir/Makefile b/tools/firmware/xen-dir/Makefile
index a7e69ae..84648c3 100644
--- a/tools/firmware/xen-dir/Makefile
+++ b/tools/firmware/xen-dir/Makefile
@@ -41,16 +41,12 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE
$(D): linkfarm.stamp
$(MAKE) -C $(D)/xen distclean
-.PHONY: shim-%config
-shim-%config: $(D) FORCE
- $(MAKE) -C $(D)/xen $*config \
- XEN_CONFIG_EXPERT=y \
- KCONFIG_CONFIG=$(CURDIR)/shim.config
-
-xen-shim: $(D) shim-olddefconfig
- $(MAKE) -C $(D)/xen build \
- XEN_CONFIG_EXPERT=y \
- KCONFIG_CONFIG=$(CURDIR)/shim.config
+$(D)/xen/.config: shim.config $(D)
+ cp $< $@
+ $(MAKE) -C $(@D) olddefconfig XEN_CONFIG_EXPERT=y
+
+xen-shim: $(D)/xen/.config
+ $(MAKE) -C $(<D) build XEN_CONFIG_EXPERT=y
ln -sf $(D)/xen/xen $@
ln -sf $(D)/xen/xen-syms $@-syms
--
2.7.4

View File

@ -1,41 +0,0 @@
From 7f601f7c341c80d554615556d60e3b8ed1e5ad4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek@invisiblethingslab.com>
Date: Thu, 5 Apr 2018 03:50:54 +0200
Subject: [PATCH] tools/gdbsx: fix -Wstringop-truncation warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
gcc-8 complains:
gx_main.c: In function 'prepare_stop_reply':
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]
strncpy(buf, "watch:", 6);
^~~~~~~~~~~~~~~~~~~~~~~~~
Since terminating '\0' isn't needed here at all, switch to memcpy.
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-Acked-by: Juergen Gross <jgross@suse.com>
---
tools/debugger/gdbsx/gx/gx_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/debugger/gdbsx/gx/gx_main.c b/tools/debugger/gdbsx/gx/gx_main.c
index a908c45..6dfa501 100644
--- a/tools/debugger/gdbsx/gx/gx_main.c
+++ b/tools/debugger/gdbsx/gx/gx_main.c
@@ -382,7 +382,7 @@ prepare_stop_reply(enum target_signal sig, char *buf, vcpuid_t vcpu)
/* TBD: check if we stopped because of watchpoint */
if (watchpoint_stop()) {
- strncpy(buf, "watch:", 6);
+ memcpy(buf, "watch:", 6);
buf += 6;
/* TBD: **/
}
--
2.7.4

View File

@ -1,47 +0,0 @@
From 437e00fea04becc91c1b6bc1c0baa636b067a5cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek@invisiblethingslab.com>
Date: Thu, 5 Apr 2018 03:50:55 +0200
Subject: [PATCH] tools/kdd: mute spurious gcc warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
gcc-8 complains:
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]
memcpy(buf, ((uint8_t *)&ctrl.c32) + offset, len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kdd.c: In function 'kdd_select_callback':
kdd.c:642:14: note: 'ctrl' declared here
kdd_ctrl ctrl;
^~~~
But this is impossible - 'offset' is unsigned and correctly validated
few lines before.
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-Acked-by: Juergen Gross <jgross@suse.com>
---
tools/debugger/kdd/kdd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/debugger/kdd/kdd.c b/tools/debugger/kdd/kdd.c
index 1bd5dd5..61d769e 100644
--- a/tools/debugger/kdd/kdd.c
+++ b/tools/debugger/kdd/kdd.c
@@ -695,7 +695,10 @@ static void kdd_handle_read_ctrl(kdd_state *s)
KDD_LOG(s, "Request outside of known control space\n");
len = 0;
} else {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
memcpy(buf, ((uint8_t *)&ctrl.c32) + offset, len);
+#pragma GCC diagnostic pop
}
}
--
2.7.4

View File

@ -1,52 +0,0 @@
From 2de2b10b2252761baa5dd0077df384dbfcca8212 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek@invisiblethingslab.com>
Date: Tue, 22 May 2018 21:47:45 +0200
Subject: [PATCH] tools/kdd: alternative way of muting spurious gcc warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Older gcc does not support #pragma GCC diagnostics, so use alternative
approach - change variable type to uint32_t (this code handle 32-bit
requests only anyway), which apparently also avoid gcc complaining about
this (otherwise correct) code.
Fixes 437e00fea04becc91c1b6bc1c0baa636b067a5cc "tools/kdd: mute spurious
gcc warning"
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
---
tools/debugger/kdd/kdd.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tools/debugger/kdd/kdd.c b/tools/debugger/kdd/kdd.c
index 61d769e..5a019a0 100644
--- a/tools/debugger/kdd/kdd.c
+++ b/tools/debugger/kdd/kdd.c
@@ -687,7 +687,7 @@ static void kdd_handle_read_ctrl(kdd_state *s)
}
} else {
/* 32-bit control-register space starts at 0x[2]cc, for 84 bytes */
- uint64_t offset = addr;
+ uint32_t offset = addr;
if (offset > 0x200)
offset -= 0x200;
offset -= 0xcc;
@@ -695,10 +695,7 @@ static void kdd_handle_read_ctrl(kdd_state *s)
KDD_LOG(s, "Request outside of known control space\n");
len = 0;
} else {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Warray-bounds"
memcpy(buf, ((uint8_t *)&ctrl.c32) + offset, len);
-#pragma GCC diagnostic pop
}
}
--
2.7.4

View File

@ -1,44 +0,0 @@
From fa7789ef18bd2e716997937af71b2e4b5b00a159 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek@invisiblethingslab.com>
Date: Thu, 5 Apr 2018 03:50:49 +0200
Subject: [PATCH] tools/libxc: fix strncpy size
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
gcc-8 warns about possible truncation of trailing '\0'.
Final character is overridden by '\0' anyway, so don't bother to copy
it.
This fixes compile failure:
xc_pm.c: In function 'xc_set_cpufreq_gov':
xc_pm.c:308:5: error: 'strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation]
strncpy(scaling_governor, govname, CPUFREQ_NAME_LEN);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-Acked-by: Juergen Gross <jgross@suse.com>
---
tools/libxc/xc_pm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/libxc/xc_pm.c b/tools/libxc/xc_pm.c
index 67e2418..6f8d548 100644
--- a/tools/libxc/xc_pm.c
+++ b/tools/libxc/xc_pm.c
@@ -305,7 +305,7 @@ int xc_set_cpufreq_gov(xc_interface *xch, int cpuid, char *govname)
sysctl.cmd = XEN_SYSCTL_pm_op;
sysctl.u.pm_op.cmd = SET_CPUFREQ_GOV;
sysctl.u.pm_op.cpuid = cpuid;
- strncpy(scaling_governor, govname, CPUFREQ_NAME_LEN);
+ strncpy(scaling_governor, govname, CPUFREQ_NAME_LEN - 1);
scaling_governor[CPUFREQ_NAME_LEN - 1] = '\0';
return xc_sysctl(xch, &sysctl);
--
2.7.4

View File

@ -1,46 +0,0 @@
From 27751d89248c8c5eef6d8b56eb8f7d2084145080 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek@invisiblethingslab.com>
Date: Thu, 5 Apr 2018 03:50:50 +0200
Subject: [PATCH] tools/misc: fix hypothetical buffer overflow in xen-lowmemd
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
gcc-8 complains:
xen-lowmemd.c: In function 'handle_low_mem':
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=]
snprintf(error, BUFSZ,"Failed to write target %s to xenstore", data);
^~ ~~~~
xen-lowmemd.c:80:9: note: 'snprintf' output between 36 and 547 bytes into a destination of size 512
snprintf(error, BUFSZ,"Failed to write target %s to xenstore", data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In practice it wouldn't happen, because 'data' contains string
representation of 64-bit unsigned number (20 characters at most).
But place a limit to mute gcc warning.
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-Acked-by: Juergen Gross <jgross@suse.com>
---
tools/misc/xen-lowmemd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/misc/xen-lowmemd.c b/tools/misc/xen-lowmemd.c
index 865a54c..79ad34c 100644
--- a/tools/misc/xen-lowmemd.c
+++ b/tools/misc/xen-lowmemd.c
@@ -77,7 +77,7 @@ void handle_low_mem(void)
if (!xs_write(xs_handle, XBT_NULL,
"/local/domain/0/memory/target", data, strlen(data)))
{
- snprintf(error, BUFSZ,"Failed to write target %s to xenstore", data);
+ snprintf(error, BUFSZ,"Failed to write target %.24s to xenstore", data);
perror(error);
}
}
--
2.7.4

View File

@ -1,74 +0,0 @@
From 938c8f53b1f80175c6f7a1399efdb984abb0cb8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?=
<marmarek@invisiblethingslab.com>
Date: Thu, 5 Apr 2018 03:50:53 +0200
Subject: [PATCH] tools/xenpmd: fix possible '\0' truncation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
gcc-8 complains:
xenpmd.c:207:9: error: 'strncpy' specified bound 32 equals destination size [-Werror=stringop-truncation]
strncpy(info->oem_info, attrib_value, 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xenpmd.c:201:9: error: 'strncpy' specified bound 32 equals destination size [-Werror=stringop-truncation]
strncpy(info->battery_type, attrib_value, 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xenpmd.c:195:9: error: 'strncpy' specified bound 32 equals destination size [-Werror=stringop-truncation]
strncpy(info->serial_number, attrib_value, 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xenpmd.c:189:9: error: 'strncpy' specified bound 32 equals destination size [-Werror=stringop-truncation]
strncpy(info->model_number, attrib_value, 32);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copy 31 chars, then make sure terminating '\0' is present. Those fields
are passed to strlen and as '%s' for snprintf later.
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-Acked-by: Juergen Gross <jgross@suse.com>
---
tools/xenpmd/xenpmd.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/tools/xenpmd/xenpmd.c b/tools/xenpmd/xenpmd.c
index 689c8fd..56412a9 100644
--- a/tools/xenpmd/xenpmd.c
+++ b/tools/xenpmd/xenpmd.c
@@ -186,25 +186,29 @@ void set_attribute_battery_info(char *attrib_name,
if ( strstr(attrib_name, "model number") )
{
- strncpy(info->model_number, attrib_value, 32);
+ strncpy(info->model_number, attrib_value, 31);
+ info->model_number[31] = '\0';
return;
}
if ( strstr(attrib_name, "serial number") )
{
- strncpy(info->serial_number, attrib_value, 32);
+ strncpy(info->serial_number, attrib_value, 31);
+ info->serial_number[31] = '\0';
return;
}
if ( strstr(attrib_name, "battery type") )
{
- strncpy(info->battery_type, attrib_value, 32);
+ strncpy(info->battery_type, attrib_value, 31);
+ info->battery_type[31] = '\0';
return;
}
if ( strstr(attrib_name, "OEM info") )
{
- strncpy(info->oem_info, attrib_value, 32);
+ strncpy(info->oem_info, attrib_value, 31);
+ info->oem_info[31] = '\0';
return;
}
--
2.7.4

View File

@ -1,19 +0,0 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
require xen.inc
SRC_URI = " \
https://downloads.xenproject.org/release/xen/${PV}/xen-${PV}.tar.gz \
file://tools-libxc-fix-strncpy-size.patch \
file://tools-misc-fix-hypothetical-buffer-overflow.patch \
file://tools-xentop-vwprintw.patch \
file://tools-xenpmd-fix-possible-0-truncation.patch \
file://tools-gdbsx-fix-Wstringop-truncation-warning.patch \
file://tools-kdd-mute-spurious-gcc-warning-part1.patch \
file://tools-kdd-mute-spurious-gcc-warning-part2.patch \
file://shim-don-t-let-build-modify-shim.config.patch \
"
SRC_URI[md5sum] = "d1b1d14ce76622062c9977d9c8ba772e"
SRC_URI[sha256sum] = "570d654f357d4085accdf752989c1cbc33e2075feac8fcc505d68bdb81b1a0cf"
S = "${WORKDIR}/xen-${PV}"