From 9955e81b23eb6bb264b32c5bb02b326097a4ec02 Mon Sep 17 00:00:00 2001 From: Christopher Clark Date: Tue, 31 Jul 2018 12:35:42 -0700 Subject: xen: upgrade to 4.10.1, and apply patches for gcc 8.1 compatibility Adds packaging for new binary: xen-shim. Builds the hypervisor before building the tools to workaround an upstream parallel build bug that causes the shim to be rebuilt during install. Signed-off-by: Christopher Clark Signed-off-by: Bruce Ashfield --- .../xen/files/tools-libxc-fix-strncpy-size.patch | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch (limited to 'recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch') diff --git a/recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch b/recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch new file mode 100644 index 00000000..2d606cd3 --- /dev/null +++ b/recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch @@ -0,0 +1,44 @@ +From fa7789ef18bd2e716997937af71b2e4b5b00a159 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= + +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 +Acked-by: Wei Liu +Release-Acked-by: Juergen Gross +--- + 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 + -- cgit v1.2.3-54-g00ecf