Xen: upgrade to 4.11.0
cover Xen: upgrade to 4.11.0
From: Christopher Clark <[email protected]>
This patch series:
* Fixes Xen recipe compatibility with gcc 8.1
* Adds the Xen recipe for Xen's current version: 4.11.0
* Upgrades the existing Xen recipe from 4.10.0 to 4.10.1
- provided to ease backport to older branches (eg. sumo)
* Removes the 4.10.1 and 4.9.1 recipes
- superceded by version 4.11.0
* Upgrades the vtpm stubdomains to Xen version 4.11.0
* Applies a bug fix patch to the tpm emulator
* Fixes whitespace patch fuzz on a vtpm patch
Christopher Clark (7):
xen: upgrade to 4.10.1, and apply patches for gcc 8.1 compatibility
xen: add recipe for 4.11.0
tpm-emulator: apply patch to fix memcmp defect found by gcc xen-vtpm,mini-os : upgrade to Xen 4.11.0
xen-vtpm : fix patch fuzz, whitespace-only change
xen: remove 4.9.1 recipe and patches
xen: remove 4.10.1 recipe and patches
...check-to-see-if-removing-a-p2m-entry-actu.patch | 176 --------------------- ...eturn-value-of-p2m_set_entry-when-decreas.patch | 109 ------------- .../xen/files/build-undef-object-vars.patch | 24 +++ .../xen/files/mini-os_udivmoddi4-gcc7.patch | 43 ----- .../xen/files/tools-xentop-vwprintw.patch | 25 +++ .../xen/files/vtpm-deepquote-anyloc.patch | 8 +- .../xen/files/vtpm_TPM_ChangeAuthAsymFinish.patch | 28 ++++ recipes-extended/xen/files/xsa246-4.9.patch | 74 --------- recipes-extended/xen/files/xsa248.patch | 164 ------------------- recipes-extended/xen/files/xsa249.patch | 42 ----- recipes-extended/xen/files/xsa250.patch | 67 -------- recipes-extended/xen/files/xsa251.patch | 21 --- recipes-extended/xen/files/xsa253.patch | 26 --- recipes-extended/xen/mini-os_4.11.0.bb | 17 ++ recipes-extended/xen/mini-os_4.9.0.bb | 18 --- recipes-extended/xen/tpm-emulator_0.7.4.bb | 1 + recipes-extended/xen/xen-vtpm_4.11.0.bb | 21 +++ recipes-extended/xen/xen-vtpm_4.9.0.bb | 21 --- recipes-extended/xen/xen.inc | 7 + recipes-extended/xen/xen_4.10.0.bb | 12 -- recipes-extended/xen/xen_4.11.0.bb | 13 ++ recipes-extended/xen/xen_4.9.1.bb | 18 --- 22 files changed, 140 insertions(+), 795 deletions(-) delete mode 100644 recipes-extended/xen/files/0001-p2m-Always-check-to-see-if-removing-a-p2m-entry-actu.patch delete mode 100644 recipes-extended/xen/files/0002-p2m-Check-return-value-of-p2m_set_entry-when-decreas.patch create mode 100644 recipes-extended/xen/files/build-undef-object-vars.patch delete mode 100644 recipes-extended/xen/files/mini-os_udivmoddi4-gcc7.patch create mode 100644 recipes-extended/xen/files/tools-xentop-vwprintw.patch create mode 100644 recipes-extended/xen/files/vtpm_TPM_ChangeAuthAsymFinish.patch delete mode 100644 recipes-extended/xen/files/xsa246-4.9.patch delete mode 100644 recipes-extended/xen/files/xsa248.patch delete mode 100644 recipes-extended/xen/files/xsa249.patch delete mode 100644 recipes-extended/xen/files/xsa250.patch delete mode 100644 recipes-extended/xen/files/xsa251.patch delete mode 100644 recipes-extended/xen/files/xsa253.patch create mode 100644 recipes-extended/xen/mini-os_4.11.0.bb delete mode 100644 recipes-extended/xen/mini-os_4.9.0.bb create mode 100644 recipes-extended/xen/xen-vtpm_4.11.0.bb delete mode 100644 recipes-extended/xen/xen-vtpm_4.9.0.bb delete mode 100644 recipes-extended/xen/xen_4.10.0.bb create mode 100644 recipes-extended/xen/xen_4.11.0.bb delete mode 100644 recipes-extended/xen/xen_4.9.1.bb
Signature · 1 line
2.7.4
PATCH 1/7 xen: upgrade to 4.10.1, and apply patches for gcc 8.1 compatibility
From: Christopher Clark <[email protected]>
Adds packaging for new binary: xen-shim.
---
Please use my gmail address for any correspondence to me.
.../xen/files/build-undef-object-vars.patch | 24 +++++++ ...ls-gdbsx-fix-Wstringop-truncation-warning.patch | 41 ++++++++++++ ...tools-kdd-mute-spurious-gcc-warning-part1.patch | 47 ++++++++++++++ ...tools-kdd-mute-spurious-gcc-warning-part2.patch | 52 +++++++++++++++ .../xen/files/tools-libxc-fix-strncpy-size.patch | 44 +++++++++++++ ...ols-misc-fix-hypothetical-buffer-overflow.patch | 46 ++++++++++++++ .../tools-xenpmd-fix-possible-0-truncation.patch | 74 ++++++++++++++++++++++ .../xen/files/tools-xentop-vwprintw.patch | 25 ++++++++ recipes-extended/xen/files/xsa253.patch | 26 -------- recipes-extended/xen/xen.inc | 7 ++ recipes-extended/xen/xen_4.10.0.bb | 12 ---- recipes-extended/xen/xen_4.10.1.bb | 19 ++++++ 12 files changed, 379 insertions(+), 38 deletions(-) create mode 100644 recipes-extended/xen/files/build-undef-object-vars.patch create mode 100644 recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch create mode 100644 recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part1.patch create mode 100644 recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part2.patch create mode 100644 recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch create mode 100644 recipes-extended/xen/files/tools-misc-fix-hypothetical-buffer-overflow.patch create mode 100644 recipes-extended/xen/files/tools-xenpmd-fix-possible-0-truncation.patch create mode 100644 recipes-extended/xen/files/tools-xentop-vwprintw.patch delete mode 100644 recipes-extended/xen/files/xsa253.patch delete mode 100644 recipes-extended/xen/xen_4.10.0.bb create mode 100644 recipes-extended/xen/xen_4.10.1.bb
recipes-extended/xen/files/build-undef-object-vars.patch new file +24 -0
@@ -0,0 +1,24 @@ +diff --git a/xen/Rules.mk b/xen/Rules.mk +index 0e47b37..3208130 100644 +--- a/xen/Rules.mk ++++ b/xen/Rules.mk +@@ -49,6 +49,7 @@ endif + CFLAGS += -nostdinc -fno-builtin -fno-common + CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith + CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h ++CFLAGS += '-U__OBJECT_FILE__' + CFLAGS += '-D__OBJECT_FILE__="$@"' + + ifneq ($(clang),y) +diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk +index 6bc1bb1..0f9b297 100644 +--- a/xen/arch/x86/Rules.mk ++++ b/xen/arch/x86/Rules.mk +@@ -7,6 +7,7 @@ CFLAGS += -I$(BASEDIR)/include + CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic + CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default + CFLAGS += -DXEN_IMG_OFFSET=$(XEN_IMG_OFFSET) ++CFLAGS += '-U__OBJECT_LABEL__' + CFLAGS += '-D__OBJECT_LABEL__=$(subst /,$$,$(subst -,_,$(subst $(BASEDIR)/,,$(CURDIR))/$@))' + + # Prevent floating-point variables from creeping into Xen.
recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch new file +41 -0
41 lines not on this page · raw message
recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part1.patch new file +47 -0
47 lines not on this page · raw message
recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part2.patch new file +52 -0
52 lines not on this page · raw message
recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch new file +44 -0
44 lines not on this page · raw message
recipes-extended/xen/files/tools-misc-fix-hypothetical-buffer-overflow.patch new file +46 -0
46 lines not on this page · raw message
recipes-extended/xen/files/tools-xenpmd-fix-possible-0-truncation.patch new file +74 -0
74 lines not on this page · raw message
recipes-extended/xen/files/tools-xentop-vwprintw.patch new file +25 -0
@@ -0,0 +1,25 @@ +tools/xentop : fix vwprintw -Werror=deprecated-declarations warning + +gcc-8.1 complains: + +| xentop.c: In function 'print': +| xentop.c:304:4: error: 'vwprintw' is deprecated [-Werror=deprecated-declarations] +| vwprintw(stdscr, (curses_str_t)fmt, args); +| ^~~~~~~~ + +vw_printw is the non-deprecated alternative. + +Signed-off-by: Christopher Clark <[email protected]> +diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c +index 2fd2b67..c465810 100644 +--- a/tools/xenstat/xentop/xentop.c ++++ b/tools/xenstat/xentop/xentop.c +@@ -301,7 +301,7 @@ static void print(const char *fmt, ...) + if (!batch) { + if((current_row() < lines()-1)) { + va_start(args, fmt); +- vwprintw(stdscr, (curses_str_t)fmt, args); ++ vw_printw(stdscr, (curses_str_t)fmt, args); + va_end(args); + } + } else {
recipes-extended/xen/files/xsa253.patch deleted +0 -26
@@ -1,26 +0,0 @@ -From: Andrew Cooper <[email protected]> -Subject: x86/msr: Free msr_vcpu_policy during vcpu destruction - -c/s 4187f79dc7 "x86/msr: introduce struct msr_vcpu_policy" introduced a -per-vcpu memory allocation, but failed to free it in the clean vcpu -destruction case. - -This is XSA-253 - -Signed-off-by: Andrew Cooper <[email protected]> -Reviewed-by: Jan Beulich <[email protected]> - -diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c -index b17468c..0ae715d 100644 ---- a/xen/arch/x86/domain.c -+++ b/xen/arch/x86/domain.c -@@ -382,6 +382,9 @@ void vcpu_destroy(struct vcpu *v) - - vcpu_destroy_fpu(v); - -+ xfree(v->arch.msr); -+ v->arch.msr = NULL; -+ - if ( !is_idle_domain(v->domain) ) - vpmu_destroy(v); -
recipes-extended/xen/xen.inc +7 -0
@@ -91,6 +91,7 @@ RRECOMMENDS_${PN}-base = " \ ${PN}-libvhd \ ${PN}-flask \ ${PN}-hvmloader \ + ${PN}-shim \ ${PN}-xenpaging \ "
@@ -213,6 +214,7 @@ PACKAGES = "\ ${PN}-scripts-block \ ${PN}-scripts-common \ ${PN}-scripts-network \ + ${PN}-shim \ ${PN}-staticdev \ ${PN}-volatiles \ ${PN}-xcutils \
@@ -638,6 +640,11 @@ FILES_${PN}-scripts-common = " \ ${sysconfdir}/xen/scripts/xen-script-common.sh \ " +INSANE_SKIP_${PN}-shim = "arch" +FILES_${PN}-shim = " \ + ${libdir}/xen/boot/xen-shim \ + " + FILES_${PN}-volatiles = "\ ${sysconfdir}/default/volatiles/99_xen \ ${sysconfdir}/tmpfiles.d/xen.conf \
recipes-extended/xen/xen_4.10.0.bb deleted +0 -12
@@ -1,12 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -require xen.inc - -SRC_URI = " \ - https://downloads.xenproject.org/release/xen/${PV}/xen-${PV}.tar.gz \ - file://xsa253.patch \ - " - -SRC_URI[md5sum] = "ab9d320d02cb40f6b40506aed1a38d58" -SRC_URI[sha256sum] = "0262a7023f8b12bcacfb0b25e69b2a63291f944f7683d54d8f33d4b2ca556844" - -S = "${WORKDIR}/xen-${PV}"
recipes-extended/xen/xen_4.10.1.bb new file +19 -0
@@ -0,0 +1,19 @@ +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://build-undef-object-vars.patch \ + " + +SRC_URI[md5sum] = "d1b1d14ce76622062c9977d9c8ba772e" +SRC_URI[sha256sum] = "570d654f357d4085accdf752989c1cbc33e2075feac8fcc505d68bdb81b1a0cf" + +S = "${WORKDIR}/xen-${PV}"
Signature · 1 line
2.7.4
PATCH 2/7 xen: add recipe for 4.11.0
In reply to [email protected]From: Christopher Clark <[email protected]>
---
Please use my gmail address for any correspondence to me.
recipes-extended/xen/xen_4.11.0.bb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 recipes-extended/xen/xen_4.11.0.bb
recipes-extended/xen/xen_4.11.0.bb new file +13 -0
@@ -0,0 +1,13 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +require xen.inc + +SRC_URI = " \ + https://downloads.xenproject.org/release/xen/${PV}/xen-${PV}.tar.gz \ + file://tools-xentop-vwprintw.patch \ + file://build-undef-object-vars.patch \ + " + +SRC_URI[md5sum] = "cbec0600284921744bc14119f4ed3fff" +SRC_URI[sha256sum] = "826e3a9f6d0eac94a825d272cc2c1294e22640ae75af906eb13920f9ad667643" + +S = "${WORKDIR}/xen-${PV}"
Signature · 1 line
2.7.4
PATCH 3/7 tpm-emulator: apply patch to fix memcmp defect found by gcc
In reply to [email protected]From: Christopher Clark <[email protected]>
| tpm_emulator-0.7.4/tpm/tpm_deprecated.c:437:7: | error: 'memcmp' reading 20 bytes from a region of size 8 | [-Werror=stringop-overflow=]
| if (memcmp(&b1, &newAuthLink, sizeof(TPM_HMAC))) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Apply patch from Xen: vtpm_TPM_ChangeAuthAsymFinish.patch
---
Please use my gmail address for any correspondence to me.
.../xen/files/vtpm_TPM_ChangeAuthAsymFinish.patch | 28 ++++++++++++++++++++++ recipes-extended/xen/tpm-emulator_0.7.4.bb | 1 + 2 files changed, 29 insertions(+) create mode 100644 recipes-extended/xen/files/vtpm_TPM_ChangeAuthAsymFinish.patch
recipes-extended/xen/files/vtpm_TPM_ChangeAuthAsymFinish.patch new file +28 -0
@@ -0,0 +1,28 @@ +Patch derived from below Xen changeset. +Signed-off-by: Christopher Clark <[email protected]> + +commit 22bf5be3237cb482a2ffd772ffd20ce37285eebf +Author: Olaf Hering <[email protected]> +Date: Mon Jun 18 14:55:36 2018 +0200 + +stubdom/vtpm: fix memcmp in TPM_ChangeAuthAsymFinish + +gcc8 spotted this error: +error: 'memcmp' reading 20 bytes from a region of size 8 [-Werror=stringop-overflow=] + +Signed-off-by: Olaf Hering <[email protected]> +Reviewed-by: Samuel Thibault <[email protected]> + +diff --git a/tpm/tpm_deprecated.c b/tpm/tpm_deprecated.c +index c362b56..4c49f54 100644 +--- a/tpm/tpm_deprecated.c ++++ b/tpm/tpm_deprecated.c +@@ -434,7 +434,7 @@ TPM_RESULT TPM_ChangeAuthAsymFinish(TPM_KEY_HANDLE parentHandle, + tpm_hmac_final(&hmac_ctx, b1.digest); + /* 6. The TPM SHALL compare b1 with newAuthLink. The TPM SHALL + indicate a failure if the values do not match. */ +- if (memcmp(&b1, &newAuthLink, sizeof(TPM_HMAC))) { ++ if (memcmp(&b1, newAuthLink, sizeof(TPM_HMAC))) { + debug("TPM_ChangeAuthAsymFinish(): newAuthLink value does not match."); + return TPM_FAIL; + }
recipes-extended/xen/tpm-emulator_0.7.4.bb +1 -0
@@ -16,6 +16,7 @@ SRC_URI = "\ file://vtpm-deepquote-anyloc.patch \ file://vtpm-cmake-Wextra.patch \ file://vtpm-implicit-fallthrough.patch \ + file://vtpm_TPM_ChangeAuthAsymFinish.patch \ " SRC_URI[tpm-emulator.md5sum] = "e26becb8a6a2b6695f6b3e8097593db8" SRC_URI[tpm-emulator.sha256sum] = "4e48ea0d83dd9441cc1af04ab18cd6c961b9fa54d5cbf2c2feee038988dea459"
Signature · 1 line
2.7.4
PATCH 4/7 xen-vtpm, mini-os : upgrade to Xen 4.11.0
In reply to [email protected]From: Christopher Clark <[email protected]>
drops the gcc7 compatibility patch -- no longer required as it is present in the upstream version.
---
Please use my gmail address for any correspondence to me.
.../xen/files/mini-os_udivmoddi4-gcc7.patch | 43 ---------------------- recipes-extended/xen/mini-os_4.11.0.bb | 17 +++++++++ recipes-extended/xen/mini-os_4.9.0.bb | 18 --------- recipes-extended/xen/xen-vtpm_4.11.0.bb | 21 +++++++++++ recipes-extended/xen/xen-vtpm_4.9.0.bb | 21 ----------- 5 files changed, 38 insertions(+), 82 deletions(-) delete mode 100644 recipes-extended/xen/files/mini-os_udivmoddi4-gcc7.patch create mode 100644 recipes-extended/xen/mini-os_4.11.0.bb delete mode 100644 recipes-extended/xen/mini-os_4.9.0.bb create mode 100644 recipes-extended/xen/xen-vtpm_4.11.0.bb delete mode 100644 recipes-extended/xen/xen-vtpm_4.9.0.bb
recipes-extended/xen/files/mini-os_udivmoddi4-gcc7.patch deleted +0 -43
@@ -1,43 +0,0 @@ -From d991bdbc062248221511ecb795617c36b37e1d2e Mon Sep 17 00:00:00 2001 -From: Wei Liu <[email protected]> -Date: Wed, 9 Aug 2017 13:15:48 +0100 -Subject: [PATCH] lib/math.c: implement __udivmoddi4 - -Some code compiled by gcc 7 requires this. - -Signed-off-by: Wei Liu <[email protected]> -Reviewed-by: Samuel Thibault <[email protected]> ---- - lib/math.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/lib/math.c b/lib/math.c -index 561393e..b98cc1d 100644 ---- a/lib/math.c -+++ b/lib/math.c -@@ -6,6 +6,7 @@ - * File: math.c - * Author: Rolf Neugebauer ([email protected]) - * Changes: -+ * Implement __udivmoddi4 (Wei Liu <[email protected]>) - * - * Date: Aug 2003 - * -@@ -397,6 +398,15 @@ __umoddi3(u_quad_t a, u_quad_t b) - } - - /* -+ * Returns the quotient and places remainder in r -+ */ -+u_quad_t -+__udivmoddi4(u_quad_t a, u_quad_t b, u_quad_t *r) -+{ -+ return __qdivrem(a, b, r); -+} -+ -+/* - * From - * moddi3.c - */ --- -2.11.0
recipes-extended/xen/mini-os_4.11.0.bb new file +17 -0
@@ -0,0 +1,17 @@ +# Copyright (C) 2017 Kurt Bodiker <[email protected]> +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "Mini-OS is a tiny OS kernel distributed with the Xen Project" +HOMEPAGE = "https://wiki.xenproject.org/wiki/Mini-OS" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=8a437231894440a8f7629caa372243d0" + +# git commit hash for: xen-RELEASE-4.11.0 +SRCREV_minios = "0b4b7897e08b967a09bed2028a79fabff82342dd" +SRC_URI = "\ + git://xenbits.xen.org/mini-os.git;protocol=git;nobranch=1;destsuffix=mini-os;name=minios \ +" +S="${WORKDIR}/mini-os" +B="${S}" + +require mini-os.inc
recipes-extended/xen/mini-os_4.9.0.bb deleted +0 -18
@@ -1,18 +0,0 @@ -# Copyright (C) 2017 Kurt Bodiker <[email protected]> -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "Mini-OS is a tiny OS kernel distributed with the Xen Project" -HOMEPAGE = "https://wiki.xenproject.org/wiki/Mini-OS" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=8a437231894440a8f7629caa372243d0" - -# git commit hash for tags: xen-RELEASE-4.9.0, xen-RELEASE-4.9.1, xen-RELEASE-4.9.2 -SRCREV_minios = "ca013fa9baf92f47469ba1f2e1aaa31c41d8a0bb" -SRC_URI = "\ - git://xenbits.xen.org/mini-os.git;protocol=git;nobranch=1;destsuffix=mini-os;name=minios \ - file://mini-os_udivmoddi4-gcc7.patch \ -" -S="${WORKDIR}/mini-os" -B="${S}" - -require mini-os.inc
recipes-extended/xen/xen-vtpm_4.11.0.bb new file +21 -0
@@ -0,0 +1,21 @@ +# Copyright (C) 2017 Kurt Bodiker <[email protected]> +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "MiniOS-based vTPMs for Xen" +HOMEPAGE = "https://www.xenproject.org" +LICENSE = "GPLv2 & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=b1ceb1b03a49b202ee6f41ffd1ed0155 \ + file://vtpm/COPYING;md5=75a98062ab0322ded060d9026a1bda61 \ +" + +# git commit hash for Xen's RELEASE-4.11.0 tag +SRCREV_xen = "1eb6544a567e3e5133fafe0c4ef3545c5138d0e4" +SRC_URI = "\ + git://xenbits.xen.org/xen.git;protocol=git;nobranch=1;name=xen;subpath=stubdom \ + git://xenbits.xen.org/xen.git;protocol=git;nobranch=1;name=xen;destsuffix=stubdom/include;subpath=tools/xenstore/include \ +" + +S="${WORKDIR}/stubdom" +B="${S}" + +require xen-vtpm.inc
recipes-extended/xen/xen-vtpm_4.9.0.bb deleted +0 -21
@@ -1,21 +0,0 @@ -# Copyright (C) 2017 Kurt Bodiker <[email protected]> -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "MiniOS-based vTPMs for Xen" -HOMEPAGE = "https://www.xenproject.org" -LICENSE = "GPLv2 & BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=b1ceb1b03a49b202ee6f41ffd1ed0155 \ - file://vtpm/COPYING;md5=75a98062ab0322ded060d9026a1bda61 \ -" - -# git commit hash for Xen's RELEASE-4.9.0 tag -SRCREV_xen = "c30bf55594a53fae8aae08aabf16fc192faad7da" -SRC_URI = "\ - git://xenbits.xen.org/xen.git;protocol=git;nobranch=1;name=xen;subpath=stubdom \ - git://xenbits.xen.org/xen.git;protocol=git;nobranch=1;name=xen;destsuffix=stubdom/include;subpath=tools/xenstore/include \ -" - -S="${WORKDIR}/stubdom" -B="${S}" - -require xen-vtpm.inc
Signature · 1 line
2.7.4
PATCH 5/7 xen-vtpm : fix patch fuzz, whitespace-only change
In reply to [email protected]From: Christopher Clark <[email protected]>
---
Please use my gmail address for any correspondence to me.
recipes-extended/xen/files/vtpm-deepquote-anyloc.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
recipes-extended/xen/files/vtpm-deepquote-anyloc.patch +4 -4
@@ -101,16 +101,16 @@ index c0d62e7..6586c22 100644 - UINT32 *sigSize, BYTE **sig) + UINT32 extraInfoFlags, UINT32 *quote_blob_size, BYTE **quote_blob) { - TPM_RESULT res; - TPM_DIGEST hres; + TPM_RESULT res; + TPM_DIGEST hres; @@ -253,7 +254,7 @@ TPM_RESULT TPM_DeepQuote(TPM_NONCE *externalData, TPM_PCR_SELECTION *myPCR, - tpm_free(buf); + tpm_free(buf); - res = VTPM_GetParentQuote(&hres, ptPCR, sigSize, sig); + res = VTPM_GetParentQuote((TPM_NONCE*)&hres, ptPCR, extraInfoFlags, quote_blob_size, quote_blob); - return res; + return res; } diff --git a/tpm/tpm_marshalling.h b/tpm/tpm_marshalling.h index d510ebe..2e0c008 100644
Signature · 1 line
2.7.4
PATCH 6/7 xen: remove 4.9.1 recipe and patches
In reply to [email protected]From: Christopher Clark <[email protected]>
---
Please use my gmail address for any correspondence to me.
...check-to-see-if-removing-a-p2m-entry-actu.patch | 176 --------------------- ...eturn-value-of-p2m_set_entry-when-decreas.patch | 109 ------------- recipes-extended/xen/files/xsa246-4.9.patch | 74 --------- recipes-extended/xen/files/xsa248.patch | 164 ------------------- recipes-extended/xen/files/xsa249.patch | 42 ----- recipes-extended/xen/files/xsa250.patch | 67 -------- recipes-extended/xen/files/xsa251.patch | 21 --- recipes-extended/xen/xen_4.9.1.bb | 18 --- 8 files changed, 671 deletions(-) delete mode 100644 recipes-extended/xen/files/0001-p2m-Always-check-to-see-if-removing-a-p2m-entry-actu.patch delete mode 100644 recipes-extended/xen/files/0002-p2m-Check-return-value-of-p2m_set_entry-when-decreas.patch delete mode 100644 recipes-extended/xen/files/xsa246-4.9.patch delete mode 100644 recipes-extended/xen/files/xsa248.patch delete mode 100644 recipes-extended/xen/files/xsa249.patch delete mode 100644 recipes-extended/xen/files/xsa250.patch delete mode 100644 recipes-extended/xen/files/xsa251.patch delete mode 100644 recipes-extended/xen/xen_4.9.1.bb
recipes-extended/xen/files/0001-p2m-Always-check-to-see-if-removing-a-p2m-entry-actu.patch deleted +0 -176
@@ -1,176 +0,0 @@ -From ad208b8b7e45fb2b7c572b86c61c26412609e82d Mon Sep 17 00:00:00 2001 -From: George Dunlap <[email protected]> -Date: Fri, 10 Nov 2017 16:53:54 +0000 -Subject: [PATCH 1/2] p2m: Always check to see if removing a p2m entry actually - worked - -The PoD zero-check functions speculatively remove memory from the p2m, -then check to see if it's completely zeroed, before putting it in the -cache. - -Unfortunately, the p2m_set_entry() calls may fail if the underlying -pagetable structure needs to change and the domain has exhausted its -p2m memory pool: for instance, if we're removing a 2MiB region out of -a 1GiB entry (in the p2m_pod_zero_check_superpage() case), or a 4k -region out of a 2MiB or larger entry (in the p2m_pod_zero_check() -case); and the return value is not checked. - -The underlying mfn will then be added into the PoD cache, and at some -point mapped into another location in the p2m. If the guest -afterwards ballons out this memory, it will be freed to the hypervisor -and potentially reused by another domain, in spite of the fact that -the original domain still has writable mappings to it. - -There are several places where p2m_set_entry() shouldn't be able to -fail, as it is guaranteed to write an entry of the same order that -succeeded before. Add a backstop of crashing the domain just in case, -and an ASSERT_UNREACHABLE() to flag up the broken assumption on debug -builds. - -While we're here, use PAGE_ORDER_2M rather than a magic constant. - -This is part of XSA-247. - -Reported-by: George Dunlap <george.dunlap.com> -Signed-off-by: George Dunlap <[email protected]> -Reviewed-by: Jan Beulich <[email protected]> ---- -v4: -- Removed some training whitespace -v3: -- Reformat reset clause to be more compact -- Make sure to set map[i] = NULL when unmapping in case we need to bail -v2: -- Crash a domain if a p2m_set_entry we think cannot fail fails anyway. ---- - xen/arch/x86/mm/p2m-pod.c | 77 +++++++++++++++++++++++++++++++++++++---------- - 1 file changed, 61 insertions(+), 16 deletions(-) - -diff --git a/xen/arch/x86/mm/p2m-pod.c b/xen/arch/x86/mm/p2m-pod.c -index 730a48f928..f2ed751892 100644 ---- a/xen/arch/x86/mm/p2m-pod.c -+++ b/xen/arch/x86/mm/p2m-pod.c -@@ -752,8 +752,10 @@ p2m_pod_zero_check_superpage(struct p2m_domain *p2m, unsigned long gfn) - } - - /* Try to remove the page, restoring old mapping if it fails. */ -- p2m_set_entry(p2m, gfn, INVALID_MFN, PAGE_ORDER_2M, -- p2m_populate_on_demand, p2m->default_access); -+ if ( p2m_set_entry(p2m, gfn, INVALID_MFN, PAGE_ORDER_2M, -+ p2m_populate_on_demand, p2m->default_access) ) -+ goto out; -+ - p2m_tlb_flush_sync(p2m); - - /* Make none of the MFNs are used elsewhere... for example, mapped -@@ -810,9 +812,18 @@ p2m_pod_zero_check_superpage(struct p2m_domain *p2m, unsigned long gfn) - ret = SUPERPAGE_PAGES; - - out_reset: -- if ( reset ) -- p2m_set_entry(p2m, gfn, mfn0, 9, type0, p2m->default_access); -- -+ /* -+ * This p2m_set_entry() call shouldn't be able to fail, since the same order -+ * on the same gfn succeeded above. If that turns out to be false, crashing -+ * the domain should be the safest way of making sure we don't leak memory. -+ */ -+ if ( reset && p2m_set_entry(p2m, gfn, mfn0, PAGE_ORDER_2M, -+ type0, p2m->default_access) ) -+ { -+ ASSERT_UNREACHABLE(); -+ domain_crash(d); -+ } -+ - out: - gfn_unlock(p2m, gfn, SUPERPAGE_ORDER); - return ret; -@@ -869,19 +880,30 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count) - } - - /* Try to remove the page, restoring old mapping if it fails. */ -- p2m_set_entry(p2m, gfns[i], INVALID_MFN, PAGE_ORDER_4K, -- p2m_populate_on_demand, p2m->default_access); -+ if ( p2m_set_entry(p2m, gfns[i], INVALID_MFN, PAGE_ORDER_4K, -+ p2m_populate_on_demand, p2m->default_access) ) -+ goto skip; - - /* See if the page was successfully unmapped. (Allow one refcount - * for being allocated to a domain.) */ - if ( (mfn_to_page(mfns[i])->count_info & PGC_count_mask) > 1 ) - { -+ /* -+ * If the previous p2m_set_entry call succeeded, this one shouldn't -+ * be able to fail. If it does, crashing the domain should be safe. -+ */ -+ if ( p2m_set_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K, -+ types[i], p2m->default_access) ) -+ { -+ ASSERT_UNREACHABLE(); -+ domain_crash(d); -+ goto out_unmap; -+ } -+ -+ skip: - unmap_domain_page(map[i]); - map[i] = NULL; - -- p2m_set_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K, -- types[i], p2m->default_access); -- - continue; - } - } -@@ -900,12 +922,25 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count) - - unmap_domain_page(map[i]); - -- /* See comment in p2m_pod_zero_check_superpage() re gnttab -- * check timing. */ -- if ( j < PAGE_SIZE/sizeof(*map[i]) ) -+ map[i] = NULL; -+ -+ /* -+ * See comment in p2m_pod_zero_check_superpage() re gnttab -+ * check timing. -+ */ -+ if ( j < (PAGE_SIZE / sizeof(*map[i])) ) - { -- p2m_set_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K, -- types[i], p2m->default_access); -+ /* -+ * If the previous p2m_set_entry call succeeded, this one shouldn't -+ * be able to fail. If it does, crashing the domain should be safe. -+ */ -+ if ( p2m_set_entry(p2m, gfns[i], mfns[i], PAGE_ORDER_4K, -+ types[i], p2m->default_access) ) -+ { -+ ASSERT_UNREACHABLE(); -+ domain_crash(d); -+ goto out_unmap; -+ } - } - else - { -@@ -929,7 +964,17 @@ p2m_pod_zero_check(struct p2m_domain *p2m, unsigned long *gfns, int count) - p2m->pod.entry_count++; - } - } -- -+ -+ return; -+ -+out_unmap: -+ /* -+ * Something went wrong, probably crashing the domain. Unmap -+ * everything and return. -+ */ -+ for ( i = 0; i < count; i++ ) -+ if ( map[i] ) -+ unmap_domain_page(map[i]); - } - - #define POD_SWEEP_LIMIT 1024 --- -2.15.0 -
recipes-extended/xen/files/0002-p2m-Check-return-value-of-p2m_set_entry-when-decreas.patch deleted +0 -109
109 lines not on this page · raw message
recipes-extended/xen/files/xsa246-4.9.patch deleted +0 -74
74 lines not on this page · raw message
recipes-extended/xen/files/xsa248.patch deleted +0 -164
164 lines not on this page · raw message
recipes-extended/xen/files/xsa249.patch deleted +0 -42
42 lines not on this page · raw message
recipes-extended/xen/files/xsa250.patch deleted +0 -67
67 lines not on this page · raw message
recipes-extended/xen/files/xsa251.patch deleted +0 -21
@@ -1,21 +0,0 @@ -From: Jan Beulich <[email protected]> -Subject: x86/paging: don't unconditionally BUG() on finding SHARED_M2P_ENTRY - -PV guests can fully control the values written into the P2M. - -This is XSA-251. - -Signed-off-by: Jan Beulich <[email protected]> -Reviewed-by: Andrew Cooper <[email protected]> - ---- a/xen/arch/x86/mm/paging.c -+++ b/xen/arch/x86/mm/paging.c -@@ -274,7 +274,7 @@ void paging_mark_pfn_dirty(struct domain - return; - - /* Shared MFNs should NEVER be marked dirty */ -- BUG_ON(SHARED_M2P(pfn_x(pfn))); -+ BUG_ON(paging_mode_translate(d) && SHARED_M2P(pfn_x(pfn))); - - /* - * Values with the MSB set denote MFNs that aren't really part of the
recipes-extended/xen/xen_4.9.1.bb deleted +0 -18
@@ -1,18 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -require xen.inc - -SRC_URI = " \ - https://downloads.xenproject.org/release/xen/${PV}/xen-${PV}.tar.gz \ - file://xsa246-4.9.patch \ - file://0001-p2m-Always-check-to-see-if-removing-a-p2m-entry-actu.patch \ - file://0002-p2m-Check-return-value-of-p2m_set_entry-when-decreas.patch \ - file://xsa248.patch \ - file://xsa249.patch \ - file://xsa250.patch \ - file://xsa251.patch \ - " - -SRC_URI[md5sum] = "8b9d6104694b164d54334194135f7217" -SRC_URI[sha256sum] = "ecf88b01f44cd8f4ef208af3f999dceb69bdd2a316d88dd9a9535ea7b49ed356" - -S = "${WORKDIR}/xen-${PV}"
Signature · 1 line
2.7.4
PATCH 7/7 xen: remove 4.10.1 recipe and patches
In reply to [email protected]From: Christopher Clark <[email protected]>
---
Please use my gmail address for any correspondence to me.
...ls-gdbsx-fix-Wstringop-truncation-warning.patch | 41 ------------ ...tools-kdd-mute-spurious-gcc-warning-part1.patch | 47 -------------- ...tools-kdd-mute-spurious-gcc-warning-part2.patch | 52 --------------- .../xen/files/tools-libxc-fix-strncpy-size.patch | 44 ------------- ...ols-misc-fix-hypothetical-buffer-overflow.patch | 46 -------------- .../tools-xenpmd-fix-possible-0-truncation.patch | 74 ---------------------- recipes-extended/xen/xen_4.10.1.bb | 19 ------ 7 files changed, 323 deletions(-) delete mode 100644 recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch delete mode 100644 recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part1.patch delete mode 100644 recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part2.patch delete mode 100644 recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch delete mode 100644 recipes-extended/xen/files/tools-misc-fix-hypothetical-buffer-overflow.patch delete mode 100644 recipes-extended/xen/files/tools-xenpmd-fix-possible-0-truncation.patch delete mode 100644 recipes-extended/xen/xen_4.10.1.bb
recipes-extended/xen/files/tools-gdbsx-fix-Wstringop-truncation-warning.patch deleted +0 -41
@@ -1,41 +0,0 @@ -From 7f601f7c341c80d554615556d60e3b8ed1e5ad4f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= - <[email protected]> -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 <[email protected]> -Acked-by: Wei Liu <[email protected]> -Release-Acked-by: Juergen Gross <[email protected]> ---- - 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 -
recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part1.patch deleted +0 -47
47 lines not on this page · raw message
recipes-extended/xen/files/tools-kdd-mute-spurious-gcc-warning-part2.patch deleted +0 -52
52 lines not on this page · raw message
recipes-extended/xen/files/tools-libxc-fix-strncpy-size.patch deleted +0 -44
44 lines not on this page · raw message
recipes-extended/xen/files/tools-misc-fix-hypothetical-buffer-overflow.patch deleted +0 -46
46 lines not on this page · raw message
recipes-extended/xen/files/tools-xenpmd-fix-possible-0-truncation.patch deleted +0 -74
74 lines not on this page · raw message
recipes-extended/xen/xen_4.10.1.bb deleted +0 -19
@@ -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://build-undef-object-vars.patch \ - " - -SRC_URI[md5sum] = "d1b1d14ce76622062c9977d9c8ba772e" -SRC_URI[sha256sum] = "570d654f357d4085accdf752989c1cbc33e2075feac8fcc505d68bdb81b1a0cf" - -S = "${WORKDIR}/xen-${PV}"
Signature · 1 line
2.7.4
Quoted 13 lines · On Wed, Jul 18, 2018 at 3:03 PM, <[email protected]> wrote:
From: Christopher Clark <[email protected]>
This patch series:
* Fixes Xen recipe compatibility with gcc 8.1
* Adds the Xen recipe for Xen's current version: 4.11.0
* Upgrades the existing Xen recipe from 4.10.0 to 4.10.1
- provided to ease backport to older branches (eg. sumo)
* Removes the 4.10.1 and 4.9.1 recipes
- superceded by version 4.11.0
* Upgrades the vtpm stubdomains to Xen version 4.11.0
* Applies a bug fix patch to the tpm emulator
* Fixes whitespace patch fuzz on a vtpm patch
Quoted 10 lines
Christopher Clark (7):
xen: upgrade to 4.10.1, and apply patches for gcc 8.1 compatibility
xen: add recipe for 4.11.0
tpm-emulator: apply patch to fix memcmp defect found by gcc xen-vtpm,mini-os : upgrade to Xen 4.11.0
xen-vtpm : fix patch fuzz, whitespace-only change
xen: remove 4.9.1 recipe and patches
xen: remove 4.10.1 recipe and patches
Please hold off on merging this series for now as I'm intending to send a slightly updated version of it (should be next week).
Christopher
Quoted 27 lines · Christopher Clark
Quoted 14 lines · On Wed, Jul 18, 2018 at 3:03 PM, <[email protected]> wrote:
From: Christopher Clark <[email protected]>
This patch series:
* Fixes Xen recipe compatibility with gcc 8.1
* Adds the Xen recipe for Xen's current version: 4.11.0
* Upgrades the existing Xen recipe from 4.10.0 to 4.10.1
- provided to ease backport to older branches (eg. sumo)
* Removes the 4.10.1 and 4.9.1 recipes
- superceded by version 4.11.0
* Upgrades the vtpm stubdomains to Xen version 4.11.0
* Applies a bug fix patch to the tpm emulator
* Fixes whitespace patch fuzz on a vtpm patchQuoted 9 lines
Christopher Clark (7):
xen: upgrade to 4.10.1, and apply patches for gcc 8.1 compatibility
xen: add recipe for 4.11.0
tpm-emulator: apply patch to fix memcmp defect found by gcc xen-vtpm,mini-os : upgrade to Xen 4.11.0
xen-vtpm : fix patch fuzz, whitespace-only change
xen: remove 4.9.1 recipe and patches
xen: remove 4.10.1 recipe and patches
Quoted 2 lines
Please hold off on merging this series for now as I'm intending to send a slightly updated version of it (should be next week).
Sounds good.
I was letting it sit on the list for comments, so now I'll wait for the next revision instead!
Cheers,
Bruce
Quoted 3 lines
Christopher
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"