diff options
author | Andreas Grapentin <andreas@grapentin.org> | 2018-01-05 23:24:44 +0100 |
---|---|---|
committer | Andreas Grapentin <andreas@grapentin.org> | 2018-01-05 23:24:58 +0100 |
commit | d4d4f735318274831a6e7ee865b43debd9fc2202 (patch) | |
tree | 310f40462163eaf3208d05e671a048fc00df89c4 /pcr/xen | |
parent | 26e7217968ad8cb9bd5f44ae4876eceb72c06e70 (diff) | |
download | abslibre-d4d4f735318274831a6e7ee865b43debd9fc2202.tar.gz abslibre-d4d4f735318274831a6e7ee865b43debd9fc2202.tar.bz2 abslibre-d4d4f735318274831a6e7ee865b43debd9fc2202.zip |
pcr/xen: updated to 4.10.0
Diffstat (limited to 'pcr/xen')
-rwxr-xr-x | pcr/xen/21_linux_xen_multiboot_arch | 32 | ||||
-rw-r--r-- | pcr/xen/ChangeLog | 209 | ||||
-rw-r--r-- | pcr/xen/PKGBUILD | 133 | ||||
-rw-r--r-- | pcr/xen/efi-xen.cfg | 2 | ||||
-rw-r--r-- | pcr/xen/patch-gcc7-minios-udivmod.patch | 31 | ||||
-rw-r--r-- | pcr/xen/patch-gcc7-vtpm-implicit-fallthrough.patch | 46 | ||||
-rw-r--r-- | pcr/xen/patch-gcc7-vtpmmgr-make-inline-static.patch | 1161 | ||||
-rw-r--r-- | pcr/xen/patch-ipxe-patches-series.patch | 18 | ||||
-rw-r--r-- | pcr/xen/patch-ovmf-apply-inbuild-patches.patch | 26 | ||||
-rw-r--r-- | pcr/xen/patch-ovmf-patches-series.patch | 20 | ||||
-rw-r--r-- | pcr/xen/xen.install | 2 |
11 files changed, 119 insertions, 1561 deletions
diff --git a/pcr/xen/21_linux_xen_multiboot_arch b/pcr/xen/21_linux_xen_multiboot_arch index ef3a39b54..877bf2233 100755 --- a/pcr/xen/21_linux_xen_multiboot_arch +++ b/pcr/xen/21_linux_xen_multiboot_arch @@ -85,18 +85,14 @@ linux_entry () type="$4" args="$5" xen_args="$6" - ver="" - if $($grub_file --is-x86-multiboot2 ${xen_dirname}/${xen_basename}); then - ver="2" - fi if [ -z "$boot_device_id" ]; then boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" fi if [ x$type != xsimple ] ; then if [ x$type = xrecovery ] ; then - title="$(gettext_printf "%s, with Xen %s and Linux-%s (recovery mode)" "${os}" "${xen_version}" "${version}")" + title="$(gettext_printf "%s, with Xen %s and Linux %s (recovery mode)" "${os}" "${xen_version}" "${version}")" else - title="$(gettext_printf "%s, with Xen %s and Linux-%s" "${os}" "${xen_version}" "${version}")" + title="$(gettext_printf "%s, with Xen %s and Linux %s" "${os}" "${xen_version}" "${version}")" fi replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')" if [ x"Xen ${xen_version}>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then @@ -126,16 +122,16 @@ linux_entry () else xen_rm_opts="no-real-mode edd=off" fi - multiboot${ver} ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts} + ${xen_loader} ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts} echo '$(echo "$lmessage" | grub_quote)' - module${ver} ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args} + ${module_loader} ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args} EOF if test -n "${initrd}" ; then # TRANSLATORS: ramdisk isn't identifier. Should be translated. message="$(gettext_printf "Loading initial ramdisk ...")" sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)' - module${ver} --nounzip ${rel_dirname}/${initrd} + ${module_loader} --nounzip ${rel_dirname}/${initrd} EOF fi sed "s/^/$submenu_indentation/" << EOF @@ -224,20 +220,30 @@ while [ "x${xen_list}" != "x" ] ; do if [ "x$is_top_level" != xtrue ]; then echo " submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {" fi + if ($grub_file --is-arm64-efi $current_xen); then + xen_loader="xen_hypervisor" + module_loader="xen_module" + else + if ($grub_file --is-x86-multiboot2 $current_xen); then + xen_loader="multiboot2" + module_loader="module2" + else + xen_loader="multiboot" + module_loader="module" + fi + fi while [ "x$list" != "x" ] ; do linux=`version_find_latest $list` gettext_printf "Found linux-libre image: %s\n" "$linux" >&2 basename=`basename $linux` dirname=`dirname $linux` rel_dirname=`make_system_path_relative_to_its_root $dirname` - version=`echo $basename | sed -e "s,^[^0-9]*-,,g"` + version=`echo $basename | sed -e "s,vmlinuz-,,g"` alt_version=`echo $version | sed -e "s,\.old$,,g"` linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" initrd= - for i in "initramfs-linux-${version}.img" \ - "initrd.img-${version}" "initrd-${version}.img" \ - "initrd-${version}.gz" \ + for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \ "initrd-${version}" "initramfs-${version}.img" \ "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ "initrd-${alt_version}" "initramfs-${alt_version}.img" \ diff --git a/pcr/xen/ChangeLog b/pcr/xen/ChangeLog index b23e810df..ced200187 100644 --- a/pcr/xen/ChangeLog +++ b/pcr/xen/ChangeLog @@ -1,169 +1,40 @@ -2015-06-24 John Thomson - * 4.7.0-1 - Xen 4.7.0 - -2015-06-11 John Thomson - * 4.6.1-7 - Apply XSA patch: 175, 178, 181 - -2015-05-23 John Thomson - * 4.6.1-6 - Apply XSA patch: 180 - -2015-05-19 John Thomson - * 4.6.1-5 - Apply XSA patch: 176 - -2016-05-12 John Thomson - * 4.6.1-4 - Apply XSA patch: 179 - Patches for GCC6 - -2016-04-19 John Thomson - * 4.6.1-3 - Apply XSA patch: 173 - -2016-03-31 John Thomson - * 4.6.1-2 - Apply XSA patch: 172 - -2016-02-19 John Thomson - * 4.6.1-1 - Xen source package updated to 4.6.1 - Apply XSA patch: 170 - -2016-02-19 John Thomson - * 4.5.2-1 - Xen source package updated to 4.5.2 - Build xen.efi with mingw-w64-binutils - Build ovmf - Apply XSA patches: 154, 156, 158 to 160, 162 to 168, and 170 - -2015-07-04 David Sutton <kantras - gmail.com> - * 4.5.1-1 - New major release from upstream - Added -fno-caller-saves CFLAG to PKGBUILD to work around GCC5 issues - Added in some compile fixes for GCC 5 - Disabled OVMF for now until patched for GCC 5 - -2015-05-13 David Sutton <kantras - gmail.com> - * 4.5.0-3 - Added Security patches - -2015-04-08 David Sutton <kantras - gmail.com> - * 4.5.0-2 - Updated PKGBUILD to use absolute instead of relative paths for install - Updated efi-xen.cfg with syntax fix - Added gnuttls-3.4.0 patch - Added security patches - -2015-03-01 David Sutton <kantras - gmail.com> - * 4.5.0-1 - New major release from upstream - Cleaned up old XSA patches - Removed old systemd support patches and realigned with the new upstream methods - -2014-10-26 David Sutton <kantras - gmail.com> - * 4.4.1-3 - Enabled OVMF support and added patches to fix compile - Enabled spice support and added patch to enable qemu support in qemu-xen - Added figlet as an make dependancy for the ascii art version number - Including an example xen.cfg package for people who will be using EFI - Additional cleanup (explictly disabling some unnecessary libraries) - -2014-10-12 David Sutton <kantras - gmail.com> - * 4.4.1-2: - Added XSA 104, 105, 106, 107 and 108 security patches - Added .config to resolve compile issues where /etc/sysconfig exists - -2014-09-04 David Sutton <kantras - gmail.com> - * 4.4.1-1: - New Upstream release - Cleared out unnecessary patches (security, gcc compile and pit) - -2014-06-22 David Sutton <kantras - gmail.com> - * 4.4.0-6: - Added additional patch to support XSA 100 on AMD platform - -2014-06-17 David Sutton <kantras - gmail.com> - * 4.4.0-5: - Added XSA 96 and 100 security patches - Added patch to explictly disable searching for bluez libs - Cleaned up PKGBUILD - -2014-05-17 David Sutton <kantras - gmail.com> - * 4.4.0-4: - Added patch to fix shutdown issues with pvh domains - -2014-05-01 David Sutton <kantras - gmail.com> - * 4.4.0-3: - Added XSA 92 Security patch - Added fix for compiling under GCC 4.9.0 (From Fedora Rawhide SRPM) - Added updates to 09_xen to closer match system 10_linux - -2014-03-11 David Sutton <kantras - gmail.com> - * 4.4.0-2: - Moved xen-syms file so 09_xen won't pick it up as a potential kernel. - Added XSA 89 Security patch - Minor PKGBUILD cleanup/changes - -2014-03-10 David Sutton <kantras - gmail.com> - * 4.4.0-1: - New upstream release - Cleaned up old unnecessary patches - -2014-02-19 David Sutton <kantras - gmail.com> - * 4.3.2-1: - New upstream release - Removed unnecessary security patches (since now integrated into source) - Attempts to pull down additional required source file to ensure not corrupted - Added missing dependancy libseccomp - -2013-11-25 David Sutton <kantras - gmail.com> - * 4.3.1-2: - Changed bluez dependancy from bluez4 to bluez - Added recent security patches - -2013-10-31 David Sutton <kantras - gmail.com> - * 4.3.1-1: - New upstream release - Removed unnecessary security patches (already merged) - Fixed BIOS Workaround patch to apply to the new source files - Fixed ATI Passthrough patch to apply to the new source files - Updated paths in all patches - -2013-09-29 David Sutton <kantras - gmail.com> - * 4.3.0-7: - Fixed optdepends in PKGBUILD - Added in a pre_remove function in xen.install to disable services - Minor text formating changes in xen.install - Added XSA 62,63,64 and 66 patches (Xen Security Advisories) - -2013-09-29 David Sutton <kantras - gmail.com> - * 4.3.0-6: - Fixed 09_xen so it can detect lts kernels - -2013-09-28 David Sutton <kantras - gmail.com> - * 4.3.0-5: - Fixed mount option in 09_xen from ro to rw - Added in dummy /etc/xen/grub.conf to control settings in 09_xen - Fix library sanitize so that it returns to the base directory - Move the syms file to /usr/share/xen so that it is out of the way of boot but still accessible - Added optional dependancy for openvswitch - -2013-08-13 David Sutton <kantras - gmail.com> - * 4.3.0-4 : - Added patch for qemu-xen to add a TOM register for PCI Hole mapping - Protected /etc/conf.d/xendomains from being overwritten - Included ATI Passthrough patch (not enabled by default, compile tested only) - -2013-07-23 David Sutton <kantras - gmail.com> - - * 4.3.0-3 : - added ChangeLog. - Cleaned up PKGBUILD to match Arch Package Standards - Fixed some path references - /var/run to /run - Removed some unnecessary empty directories - Updated xenconsoled and xenstored so they use /run for pid file - Updated auto-created /run directories to include xenstored - +2018-01-04 John Thomson + * 4.10.0-2 + XSA-253 x86: memory leak with MSR emulation + +2017-12-13 John Thomson + * 4.10.0-1 + Xen 4.10 release + +2017-12-04 John Thomson + * 4.10.0rc8 + Xen 4.10 release candidate 8 + +2017-12-01 John Thomson + * 4.10.0rc7 + Xen 4.10 release candidate 7 + +2017-11-23 John Thomson + * 4.10.0rc6 + Xen 4.10 release candidate 6 + +2017-11-18 John Thomson + * 4.10.0rc5 + Xen 4.10 release candidate 5 + grub multiboot2 config generator updated + +2017-11-13 John Thomson + * 4.10.0rc4 + Xen 4.10 release candidate 4 + +2017-11-02 John Thomson + * 4.10.0rc3 + Xen 4.10 release candidate 3 + +2017-10-23 John Thomson + * 4.10.0rc2 + Xen 4.10 release candidate 2 + +2017-10-18 John Thomson + * 4.10.0rc1 + Xen 4.10 release candidate 1 diff --git a/pcr/xen/PKGBUILD b/pcr/xen/PKGBUILD index 6636b6993..2e0dd94d8 100644 --- a/pcr/xen/PKGBUILD +++ b/pcr/xen/PKGBUILD @@ -1,4 +1,4 @@ -# current version adapted from https://gitlab.com/johnth/aur-xen/blob/ea6a7a5938eb8bb4fbcd5de11220b2a7bbe12121/PKGBUILD +# current version adapted from https://gitlab.com/archlinux-packages-johnth/xen/tree/xen-4.10 # Maintainer (AUR): John Thomson <aur.xen at j0aur.mm.st> # Contributor (Arch): David Sutton <kantras - gmail.com> @@ -34,10 +34,10 @@ _build_livepatch="${build_livepatch:-false}" pkgbase=xen pkgname=(xen{,-docs,-syms}) _pkgname=xen -pkgver=4.9.0 +pkgver=4.10.0 _pkgver=${pkgver/rc/-rc} -pkgrel=1.parabola2 -pkgdesc="Virtual Machine Hypervisor & Tools (Parabola rebranded)" +pkgrel=1 +pkgdesc='Virtual Machine Hypervisor & Tools (Parabola rebranded)' arch=(x86_64 armv7h) depends=( bridge-utils @@ -45,6 +45,7 @@ depends=( gnutls iproute2 libaio + libcacard libcap-ng libiscsi libnl @@ -86,6 +87,11 @@ makedepends=( gcc-multilib iasl ) +[[ "$CARCH" == 'i686' ]] && makedepends+=( + bin86 + dev86 + iasl +) ## For building Xen EFI boot file. ## mingw-w64-binutils only needed if @@ -93,15 +99,19 @@ makedepends=( _binutils_efi=false if [[ "$CARCH" == 'x86_64' ]]; then - _binutils_emulations="$(ld -V)" - if [[ "$_binutils_emulations" == *'i386pep'* ]]; then - _binutils_efi=true - #ld has efi support + if which ld 2>&1 > /dev/null; then + _binutils_emulations="$(ld -V)" + if [[ "$_binutils_emulations" == *'i386pep'* ]]; then + _binutils_efi=true + msg '#ld has efi support' + else + makedepends+=( + mingw-w64-binutils + ) + msg '#ld does not have efi support, using mingw' + fi else - makedepends+=( - mingw-w64-binutils - ) - #ld does not have efi support, using mingw + true fi fi @@ -111,9 +121,9 @@ changelog=ChangeLog ##SeaBIOS & OVMF tags are in src/xen-*/tools/Config.mk ##grep -rE '_(REVISION|VERSION|TAG)( \?| :){0,1}=' src/xen**/{Config.mk,stubdom/configure,tools/firmware/etherboot/Makefile} -_git_tag_seabios='#tag=rel-1.10.0' -_git_tag_ovmf='#tag=5920a9d16b1ab887c2858224316a98e961d71b05' -_git_tag_ipxe='827dd1bfee67daa683935ce65316f7e0f057fe1c' +_git_tag_seabios='#tag=rel-1.10.2' +_git_tag_ovmf='#tag=947f3737abf65fda63f3ffd97fddfa6986986868' +_git_tag_ipxe='356f6c1b64d7a97746d1816cef8ca22bdd8d0b5d' if [[ "$_build_stubdom" == true ]]; then if [[ "$CARCH" == *'arm'* ]]; then @@ -135,18 +145,6 @@ source=( ## Compile patches ati-passthrough.patch patch-ovmf-use-python2.patch - patch-ovmf-apply-inbuild-patches.patch - patch-ovmf-patches-series.patch - #patch-build-efi-with-mingw.patch::https://github.com/jakogut/xen-igvtg-aur/raw/28c81072e419d72a100ada9c393e37fae35ad263/xen_efi_build.patch - patch-inbuild-ovmf-5-hiilib.c-pointer-zero.patch::'https://github.com/tianocore/edk2/commit/fe4a28ccbfd33cae9e1f56b174d46b4eb2329efd.patch' - patch-inbuild-ipxe-gcc7-implicit-fallthrough.patch::'https://github.com/ipxe/ipxe/commit/5f85cbb9ee1c00cec81a848a9e871ad5d1e7f53f.patch' - patch-inbuild-ipxe-gcc7-implicit-fallthrough-ath5k.patch::'https://github.com/ipxe/ipxe/commit/45f2265bfcbbf2afd7fac24372ae26e453f2b52d.patch' - patch-inbuild-ipxe-gcc7-implicit-fallthrough-curses.patch::'https://github.com/ipxe/ipxe/commit/28e26dd2503e6006fabb26f8c33050ba93a99623.patch' - patch-ipxe-patches-series.patch - patch-gcc7-vtpm-implicit-fallthrough.patch - patch-gcc7-vtpmmgr-make-inline-static.patch - patch-gcc7-minios-udivmod.patch - patch-gcc7-rombios.patch::'https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff_plain;h=672949d6c61d9cba01c5b414eed9d522082f04d3' ## Files xen.install @@ -155,10 +153,11 @@ source=( "tmpfiles.d-$_pkgname.conf" ## XSA patches + https://xenbits.xen.org/xsa/xsa253.patch ) if [[ "$_build_stubdom" == true ]]; then - echo '#building with stubdom' + msg '#building with stubdom' source+=( http://xenbits.xen.org/xen-extfiles/lwip-1.3.0.tar.gz http://xenbits.xen.org/xen-extfiles/zlib-1.2.3.tar.gz @@ -193,37 +192,18 @@ fi validpgpkeys=('23E3222C145F4475FA8060A783FE14C957E82BD9') #gpg --keyserver pgp.mit.edu --recv-key 23E3222C145F4475FA8060A783FE14C957E82BD9 -sha256sums=( - 'cade643fe3310d4d6f97d0c215c6fa323bc1130d7e64d7e2043ffaa73a96f33b' - 'SKIP' - '36deacb946c59ad1d6600f6e5b89d6a7a8961e65eb000900e184075920120f49' - - 'SKIP' - 'SKIP' - - 'd93c2d5bcdf0c3e4c6e8efb357cb4b9d618209025361f5ccd9d03651a8acd7a3' - '5fb65130f96d1728368a09042e55f622c14117572030ce2141bff4ae150e4a01' - 'a853a38b8fd661d6b99979831cdae014cd23d831b57a90a467400660343f23f6' - '81b93e8c9e0ecb0d8c0555892b27b7e6c39d961af33cdea53ac72070e3e741b2' - #'a8ce42777e22af49080131e174b6b89c6e7597539838fb8b17a12280fd10b10b' - '79d8ce76bdeb72a1583254f1fb80309e56428d7406a6605a5ec860dc5a1beb3d' - 'e042b0161d76ee9af7b113c46703dde2663f762d696f4290585be36d907e97a5' - '2be4efb8be044c9b2459d09f5a6390fecb218ed4cb38964bce0674882817b91a' - 'db21442e38be53d342c7574c7c17fb8ce45e57c11dd1ad99e60641ea4061653b' - '9135c1ca7aed28a86afc7a0feb2930bd95b4fabf865dd368e8912cc77d38fb33' - '0ce9de822712e2b538dc144ba23b584970ac73b327277917b4afaa321c5b4b0c' - '5727d42575dfac1870d235fab23b8a230857cfdf44372bc1d98bb6384b752367' - 'b6fa5bff89242719b20747d7eb197d0aeb59f8a89e841137f0b0cab17de20686' - '70b41197cde89d71e37d0c0d2af7087f4ec0a85db3f3e01f22cd2f91bf68b3c8' - - #pkgbuild files - '330bcc5ab22e982d37495b57176d306353c220fec7c2b6c4a78a9133382a623e' - '9b2e6880d6345d1029317d7d65c85e07039b795c988b6852159d2ad673b13930' - '95f09bccc104d98c14559000823cb50f0d076f6a65b9f3b4e7725762b84ab5c7' - '40e0760810a49f925f2ae9f986940b40eba477dc6d3e83a78baaae096513b3cf' - - ## XSA patches -) +sha256sums=('0262a7023f8b12bcacfb0b25e69b2a63291f944f7683d54d8f33d4b2ca556844' + 'SKIP' + '251e5516d7de470c434ae5c393aacca2b61fb24d93770592a4a20add60b785c4' + 'SKIP' + 'SKIP' + 'd93c2d5bcdf0c3e4c6e8efb357cb4b9d618209025361f5ccd9d03651a8acd7a3' + '5fb65130f96d1728368a09042e55f622c14117572030ce2141bff4ae150e4a01' + '55145ff9c1570257478842e4001b0dafe007d90f5b06db17231bc5bf20f3b23d' + '8101316cfdf4b59e9c39b7372d4240a4552971c0fa53a4719bbb7a22f5622f4e' + 'efb3c5713d556aa4890136ebf61502060cf90234fbd2e85701ad7a7ed2524fb1' + '40e0760810a49f925f2ae9f986940b40eba477dc6d3e83a78baaae096513b3cf' + 'bba1abb5e4368421de29385e37f8477bf3534d3ba3ff7e2aae9c9d3da53f1393') if [[ "$_build_stubdom" == true ]]; then @@ -270,8 +250,9 @@ prepare() { ### Patching # XSA Patches - echo 'XSA patches' + msg 'XSA patches' # Security Patches - Base + patch -Np1 -i "$srcdir/xsa253.patch" # Security Patches - qemu-xen-traditional cd 'tools/qemu-xen-traditional/' @@ -283,13 +264,11 @@ prepare() { # Compile Patches - echo 'Compile patches' - patch -Np1 -i "$srcdir/patch-gcc7-rombios.patch" + msg 'Compile patches' # Build EFI binary with mingw if [[ "$_binutils_efi" != true ]]; then if $(stat /usr/x86_64-w64-mingw32/bin/ld >/dev/null 2>&1); then - #patch -Np1 -i "$srcdir/patch-build-efi-with-mingw.patch" sed -i.bak '/ EFI_LD/s/LD/LD_EFI/' xen/arch/x86/Makefile sed -i.bak 's/LD/LD_EFI/' xen/arch/x86/efi/Makefile sed -i.bak '/EFI_MOUNTPOINT .*/aLD_EFI ?= $(LD)' xen/Makefile @@ -302,10 +281,8 @@ prepare() { # OVMF Compile support (Pulls from GIT repo, so patching to patch after pull request) patch -Np1 -i "$srcdir/patch-ovmf-use-python2.patch" - patch -Np1 -i "$srcdir/patch-ovmf-apply-inbuild-patches.patch" - mkdir -p tools/firmware/ovmf-patches - patch -Np1 -i "$srcdir/patch-ovmf-patches-series.patch" - cp "$srcdir"/patch-inbuild-ovmf*.patch tools/firmware/ovmf-patches/ + #mkdir -p tools/firmware/ovmf-patches + #cp "$srcdir"/patch-inbuild-ovmf*.patch tools/firmware/ovmf-patches/ # Uncomment line below if you want to enable ATI Passthrough support (some reported successes, untested with 4.4) #patch -Np1 -i "$srcdir/ati-passthrough.patch" @@ -321,10 +298,20 @@ prepare() { sed -i 's:/var/run:/run:' ${_var_run_fixed_paths[@]} ## Fix python version in shebang - echo 'Fix python shebang to python2' + msg 'Fix python shebang to python2' _python_files=( $(grep -Rlse '^#!/usr/bin/.*python$' || : ) ) sed -Ei 's|(^#!.*/usr/bin/(env ){0,1})python$|\1python2|' ${_python_files[@]} + ## Fix systemd-modules-load.d/xen.conf + ## remove nonexistent modules + find tools -iname 'configure*' -exec sed -i -E -e ' + /^LINUX_BACKEND_MODULES="$/,/^"$/ { + #Address range where this variable is set + /"/b; #Do noting if the line contains " + /^xen-/!d; #Delete if does not start with xen + s/scsibk/scsiback/; #Change scsibk to scsiback + };' {} \; + if [[ "$_build_stubdom" == true ]]; then # Copy supporting tarballs into place ln -s "$srcdir/lwip-1.3.0.tar.gz" stubdom/ @@ -339,18 +326,14 @@ prepare() { ## Stubdom patches cd 'extras/mini-os' - patch -Np1 -i "$srcdir/patch-gcc7-minios-udivmod.patch" cd '../../' #vtpm - patch -Np1 -i "$srcdir/patch-gcc7-vtpmmgr-make-inline-static.patch" - patch -Np1 -i "$srcdir/patch-gcc7-vtpm-implicit-fallthrough.patch" fi #etherboot ln -s "$srcdir/ipxe-git-$_git_tag_ipxe.tar.gz" tools/firmware/etherboot/ipxe.tar.gz - patch -Np1 -i "$srcdir/patch-ipxe-patches-series.patch" - cp "$srcdir"/patch-inbuild-ipxe*.patch tools/firmware/etherboot/patches/ + #cp "$srcdir"/patch-inbuild-ipxe*.patch tools/firmware/etherboot/patches/ } build() { @@ -412,9 +395,9 @@ package_xen() { 'openvswitch: Optional advanced networking support' 'urlgrabber: Required for xenpvnetboot' ) - conflicts=(xen-{git,rc,igvtg,4.{5,6,7}} xenstore) + conflicts=(xen-{git,rc,igvtg,4.{8,9}} xenstore) provides=(xenstore) - replaces=(xen-{git,rc,4.{5,6,7}}) + replaces=(xen-{git,rc,4.{8,9}}) backup=( etc/conf.d/xen{domains,commons} "etc/$_pkgname/grub.conf" diff --git a/pcr/xen/efi-xen.cfg b/pcr/xen/efi-xen.cfg index 3c8e4d04c..d9f61958a 100644 --- a/pcr/xen/efi-xen.cfg +++ b/pcr/xen/efi-xen.cfg @@ -3,5 +3,5 @@ default=xen [xen] options=console=vga dom0_mem=1024M,max:1024M dom0_max_vcpus=4 loglvl=all noreboot -kernel=vmlinuz-linux-libre root=<Root Device> rw +kernel=vmlinuz-linux-libre root=<Root Device> rw ramdisk=initramfs-linux-libre.img diff --git a/pcr/xen/patch-gcc7-minios-udivmod.patch b/pcr/xen/patch-gcc7-minios-udivmod.patch deleted file mode 100644 index 868e63c20..000000000 --- a/pcr/xen/patch-gcc7-minios-udivmod.patch +++ /dev/null @@ -1,31 +0,0 @@ -gcc7 generates a call to __udivmoddi4 ... - -stubdom/mini-os-x86_32-grub/mini-os.o: In function `_strtoll_r': -stubdom/newlib-x86_32/i686-xen-elf/newlib/libc/stdlib/../../../../../newlib-1.16.0/newlib/libc/stdlib/strtoll_r.c:110: undefined reference to `__udivmoddi4' -make[2]: *** [Makefile:167: stubdom/mini-os-x86_32-grub/mini-os] Error 1 - -... which the linker only finds if libgcc.a is provided on the commandline. - -Signed-off-by: Olaf Hering <olaf@aepfle.de> ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index ef8559b..b9c1336 100644 ---- a/Makefile -+++ b/Makefile -@@ -162,7 +162,7 @@ $(OBJ_DIR)/arch/x86/minios-x86%.lds: arch/x86/minios-x86.lds.S - $(CPP) $(ASFLAGS) -P $< -o $@ - - $(OBJ_DIR)/$(TARGET): $(OBJS) $(APP_O) arch_lib $(OBJ_DIR)/$(TARGET_ARCH_DIR)/minios-$(MINIOS_TARGET_ARCH).lds -- $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(APP_O) $(OBJS) $(LDARCHLIB) $(LDLIBS) -o $@.o -+ $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(APP_O) $(OBJS) $(LDARCHLIB) $(LDLIBS) $$(gcc -print-libgcc-file-name $(CFLAGS)) -o $@.o - $(OBJCOPY) -w -G $(GLOBAL_PREFIX)* -G _start $@.o $@.o - $(LD) $(LDFLAGS) $(LDFLAGS_FINAL) $@.o $(EXTRA_OBJS) -o $@ - gzip -f -9 -c $@ >$@.gz - -_______________________________________________ -Xen-devel mailing list -Xen-devel@lists.xen.org -https://lists.xen.org/xen-devel diff --git a/pcr/xen/patch-gcc7-vtpm-implicit-fallthrough.patch b/pcr/xen/patch-gcc7-vtpm-implicit-fallthrough.patch deleted file mode 100644 index 068752d2d..000000000 --- a/pcr/xen/patch-gcc7-vtpm-implicit-fallthrough.patch +++ /dev/null @@ -1,46 +0,0 @@ -GCC-7 have -Wimplicit-fallthrough enabled with -Wextra. Add appropriate -comment which both mute the warning and improve readibility. - -Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> ---- - stubdom/Makefile | 1 + - stubdom/vtpm-implicit-fallthrough.patch | 10 ++++++++++ - 2 files changed, 11 insertions(+) - create mode 100644 stubdom/vtpm-implicit-fallthrough.patch - -diff --git a/stubdom/Makefile b/stubdom/Makefile -index db01827..5055e31 100644 ---- a/stubdom/Makefile -+++ b/stubdom/Makefile -@@ -228,6 +228,7 @@ tpm_emulator-$(XEN_TARGET_ARCH): tpm_emulator-$(TPMEMU_VERSION).tar.gz - patch -d $@ -p1 < vtpm-deepquote.patch - patch -d $@ -p1 < vtpm-deepquote-anyloc.patch - patch -d $@ -p1 < vtpm-cmake-Wextra.patch -+ patch -d $@ -p1 < vtpm-implicit-fallthrough.patch - mkdir $@/build - cd $@/build; CC=${CC} $(CMAKE) .. -DCMAKE_C_FLAGS:STRING="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement" - touch $@ -diff --git a/stubdom/vtpm-implicit-fallthrough.patch b/stubdom/vtpm-implicit-fallthrough.patch -new file mode 100644 -index 0000000..db97be5 ---- /dev/null -+++ b/stubdom/vtpm-implicit-fallthrough.patch -@@ -0,0 +1,10 @@ -+--- tpm_emulator-x86_64/tpm/tpm_cmd_handler.c.orig 2017-04-27 13:37:14.408000000 +0200 -++++ tpm_emulator-x86_64/tpm/tpm_cmd_handler.c 2017-04-27 13:39:53.585000000 +0200 -+@@ -3397,6 +3397,7 @@ -+ sizeof(rsp->auth2->nonceOdd.nonce)); -+ tpm_hmac_update(&hmac, (BYTE*)&rsp->auth2->continueAuthSession, 1); -+ tpm_hmac_final(&hmac, rsp->auth2->auth); -++ /* fall-thru */ -+ case TPM_TAG_RSP_AUTH1_COMMAND: -+ tpm_hmac_init(&hmac, rsp->auth1->secret, sizeof(rsp->auth1->secret)); -+ tpm_hmac_update(&hmac, rsp->auth1->digest, sizeof(rsp->auth1->digest)); --- -2.7.4 - - -_______________________________________________ -Xen-devel mailing list -Xen-devel@lists.xen.org -https://lists.xen.org/xen-devel diff --git a/pcr/xen/patch-gcc7-vtpmmgr-make-inline-static.patch b/pcr/xen/patch-gcc7-vtpmmgr-make-inline-static.patch deleted file mode 100644 index a2c96691a..000000000 --- a/pcr/xen/patch-gcc7-vtpmmgr-make-inline-static.patch +++ /dev/null @@ -1,1161 +0,0 @@ -gcc7 is more strict with functions marked as inline. They are not -automatically inlined. Instead a function call is generated, but the -actual code is not visible by the linker. - -Do a mechanical change and mark every 'inline' as 'static inline'. For -simpler review the static goes into an extra line. - -Signed-off-by: Olaf Hering <olaf@aepfle.de> ---- - stubdom/vtpmmgr/marshal.h | 76 ++++++++++++++++++++++++++++++++++++++++++ - stubdom/vtpmmgr/tcg.h | 14 ++++++++ - stubdom/vtpmmgr/tpm2_marshal.h | 58 ++++++++++++++++++++++++++++++++ - stubdom/vtpmmgr/tpmrsa.h | 1 + - 4 files changed, 149 insertions(+) - -diff --git a/stubdom/vtpmmgr/marshal.h b/stubdom/vtpmmgr/marshal.h -index d826f19d89..dce19c6439 100644 ---- a/stubdom/vtpmmgr/marshal.h -+++ b/stubdom/vtpmmgr/marshal.h -@@ -47,16 +47,19 @@ typedef enum UnpackPtr { - UNPACK_ALLOC - } UnpackPtr; - -+static - inline BYTE* pack_BYTE(BYTE* ptr, BYTE t) { - ptr[0] = t; - return ++ptr; - } - -+static - inline BYTE* unpack_BYTE(BYTE* ptr, BYTE* t) { - t[0] = ptr[0]; - return ++ptr; - } - -+static - inline int unpack3_BYTE(BYTE* ptr, UINT32* pos, UINT32 max, BYTE *t) - { - if (*pos + 1 > max) -@@ -72,18 +75,21 @@ inline int unpack3_BYTE(BYTE* ptr, UINT32* pos, UINT32 max, BYTE *t) - #define unpack3_BOOL(p, x, m, t) unpack3_BYTE(p, x, m, t) - #define sizeof_BOOL(t) 1 - -+static - inline BYTE* pack_UINT16(void* ptr, UINT16 t) { - UINT16* p = ptr; - *p = cpu_to_be16(t); - return ptr + sizeof(UINT16); - } - -+static - inline BYTE* unpack_UINT16(void* ptr, UINT16* t) { - UINT16* p = ptr; - *t = be16_to_cpu(*p); - return ptr + sizeof(UINT16); - } - -+static - inline int unpack3_UINT16(BYTE* ptr, UINT32* pos, UINT32 max, UINT16 *t) - { - if (*pos + 2 > max) -@@ -93,18 +99,21 @@ inline int unpack3_UINT16(BYTE* ptr, UINT32* pos, UINT32 max, UINT16 *t) - return 0; - } - -+static - inline BYTE* pack_UINT32(void* ptr, UINT32 t) { - UINT32* p = ptr; - *p = cpu_to_be32(t); - return ptr + sizeof(UINT32); - } - -+static - inline BYTE* unpack_UINT32(void* ptr, UINT32* t) { - UINT32* p = ptr; - *t = be32_to_cpu(*p); - return ptr + sizeof(UINT32); - } - -+static - inline int unpack3_UINT32(BYTE* ptr, UINT32* pos, UINT32 max, UINT32 *t) - { - if (*pos + 4 > max) -@@ -236,16 +245,19 @@ inline int unpack3_UINT32(BYTE* ptr, UINT32* pos, UINT32 max, UINT32 *t) - #define sizeof_TCS_KEY_HANDLE(t) sizeof_UINT32(t) - - -+static - inline BYTE* pack_BUFFER(BYTE* ptr, const BYTE* buf, UINT32 size) { - memcpy(ptr, buf, size); - return ptr + size; - } - -+static - inline BYTE* unpack_BUFFER(BYTE* ptr, BYTE* buf, UINT32 size) { - memcpy(buf, ptr, size); - return ptr + size; - } - -+static - inline int unpack3_BUFFER(BYTE* ptr, UINT32* pos, UINT32 max, BYTE* buf, UINT32 size) { - if (*pos + size > max) - return TPM_SIZE; -@@ -256,11 +268,13 @@ inline int unpack3_BUFFER(BYTE* ptr, UINT32* pos, UINT32 max, BYTE* buf, UINT32 - - #define sizeof_BUFFER(b, s) s - -+static - inline BYTE* unpack_ALIAS(BYTE* ptr, BYTE** buf, UINT32 size) { - *buf = ptr; - return ptr + size; - } - -+static - inline BYTE* unpack_ALLOC(BYTE* ptr, BYTE** buf, UINT32 size) { - if(size) { - *buf = malloc(size); -@@ -271,6 +285,7 @@ inline BYTE* unpack_ALLOC(BYTE* ptr, BYTE** buf, UINT32 size) { - return ptr + size; - } - -+static - inline BYTE* unpack_PTR(BYTE* ptr, BYTE** buf, UINT32 size, UnpackPtr alloc) { - if(alloc == UNPACK_ALLOC) { - return unpack_ALLOC(ptr, buf, size); -@@ -279,6 +294,7 @@ inline BYTE* unpack_PTR(BYTE* ptr, BYTE** buf, UINT32 size, UnpackPtr alloc) { - } - } - -+static - inline int unpack3_PTR(BYTE* ptr, UINT32* pos, UINT32 max, BYTE** buf, UINT32 size, UnpackPtr alloc) { - if (size > max || *pos + size > max) - return TPM_SIZE; -@@ -292,14 +308,17 @@ inline int unpack3_PTR(BYTE* ptr, UINT32* pos, UINT32 max, BYTE** buf, UINT32 si - } - #define unpack3_VPTR(ptr, pos, max, buf, size, alloc) unpack3_PTR(ptr, pos, max, (void*)(buf), size, alloc) - -+static - inline BYTE* pack_TPM_AUTHDATA(BYTE* ptr, const TPM_AUTHDATA* d) { - return pack_BUFFER(ptr, *d, TPM_DIGEST_SIZE); - } - -+static - inline BYTE* unpack_TPM_AUTHDATA(BYTE* ptr, TPM_AUTHDATA* d) { - return unpack_BUFFER(ptr, *d, TPM_DIGEST_SIZE); - } - -+static - inline int unpack3_TPM_AUTHDATA(BYTE* ptr, UINT32* pos, UINT32 len, TPM_AUTHDATA* d) { - return unpack3_BUFFER(ptr, pos, len, *d, TPM_DIGEST_SIZE); - } -@@ -325,6 +344,7 @@ inline int unpack3_TPM_AUTHDATA(BYTE* ptr, UINT32* pos, UINT32 len, TPM_AUTHDATA - #define sizeof_TPM_TAG(t) sizeof_UINT16(t) - #define sizeof_TPM_STRUCTURE_TAG(t) sizeof_UINT16(t) - -+static - inline BYTE* pack_TPM_VERSION(BYTE* ptr, const TPM_VERSION* t) { - ptr[0] = t->major; - ptr[1] = t->minor; -@@ -333,6 +353,7 @@ inline BYTE* pack_TPM_VERSION(BYTE* ptr, const TPM_VERSION* t) { - return ptr + 4; - } - -+static - inline BYTE* unpack_TPM_VERSION(BYTE* ptr, TPM_VERSION* t) { - t->major = ptr[0]; - t->minor = ptr[1]; -@@ -341,6 +362,7 @@ inline BYTE* unpack_TPM_VERSION(BYTE* ptr, TPM_VERSION* t) { - return ptr + 4; - } - -+static - inline int unpack3_TPM_VERSION(BYTE* ptr, UINT32 *pos, UINT32 max, TPM_VERSION* t) { - if (*pos + 4 > max) - return TPM_SIZE; -@@ -355,6 +377,7 @@ inline int unpack3_TPM_VERSION(BYTE* ptr, UINT32 *pos, UINT32 max, TPM_VERSION* - - #define sizeof_TPM_VERSION(x) 4 - -+static - inline BYTE* pack_TPM_CAP_VERSION_INFO(BYTE* ptr, const TPM_CAP_VERSION_INFO* v) { - ptr = pack_TPM_STRUCTURE_TAG(ptr, v->tag); - ptr = pack_TPM_VERSION(ptr, &v->version); -@@ -366,6 +389,7 @@ inline BYTE* pack_TPM_CAP_VERSION_INFO(BYTE* ptr, const TPM_CAP_VERSION_INFO* v) - return ptr; - } - -+static - inline BYTE* unpack_TPM_CAP_VERSION_INFO(BYTE* ptr, TPM_CAP_VERSION_INFO* v, UnpackPtr alloc) { - ptr = unpack_TPM_STRUCTURE_TAG(ptr, &v->tag); - ptr = unpack_TPM_VERSION(ptr, &v->version); -@@ -377,14 +401,17 @@ inline BYTE* unpack_TPM_CAP_VERSION_INFO(BYTE* ptr, TPM_CAP_VERSION_INFO* v, Unp - return ptr; - } - -+static - inline BYTE* pack_TPM_DIGEST(BYTE* ptr, const TPM_DIGEST* d) { - return pack_BUFFER(ptr, d->digest, TPM_DIGEST_SIZE); - } - -+static - inline BYTE* unpack_TPM_DIGEST(BYTE* ptr, TPM_DIGEST* d) { - return unpack_BUFFER(ptr, d->digest, TPM_DIGEST_SIZE); - } - -+static - inline int unpack3_TPM_DIGEST(BYTE* ptr, UINT32* pos, UINT32 max, TPM_DIGEST* d) { - return unpack3_BUFFER(ptr, pos, max, d->digest, TPM_DIGEST_SIZE); - } -@@ -409,20 +436,24 @@ inline int unpack3_TPM_DIGEST(BYTE* ptr, UINT32* pos, UINT32 max, TPM_DIGEST* d) - #define pack_TPM_CHOSENID_HASH(ptr, d) pack_TPM_DIGEST(ptr, d) - #define unpack_TPM_CHOSENID_HASH(ptr, d) unpack_TPM_DIGEST(ptr, d) - -+static - inline BYTE* pack_TPM_NONCE(BYTE* ptr, const TPM_NONCE* n) { - return pack_BUFFER(ptr, n->nonce, TPM_DIGEST_SIZE); - } - -+static - inline BYTE* unpack_TPM_NONCE(BYTE* ptr, TPM_NONCE* n) { - return unpack_BUFFER(ptr, n->nonce, TPM_DIGEST_SIZE); - } - - #define sizeof_TPM_NONCE(x) TPM_DIGEST_SIZE - -+static - inline int unpack3_TPM_NONCE(BYTE* ptr, UINT32* pos, UINT32 max, TPM_NONCE* n) { - return unpack3_BUFFER(ptr, pos, max, n->nonce, TPM_DIGEST_SIZE); - } - -+static - inline BYTE* pack_TPM_SYMMETRIC_KEY_PARMS(BYTE* ptr, const TPM_SYMMETRIC_KEY_PARMS* k) { - ptr = pack_UINT32(ptr, k->keyLength); - ptr = pack_UINT32(ptr, k->blockSize); -@@ -430,6 +461,7 @@ inline BYTE* pack_TPM_SYMMETRIC_KEY_PARMS(BYTE* ptr, const TPM_SYMMETRIC_KEY_PAR - return pack_BUFFER(ptr, k->IV, k->ivSize); - } - -+static - inline BYTE* pack_TPM_SYMMETRIC_KEY(BYTE* ptr, const TPM_SYMMETRIC_KEY* k) { - ptr = pack_UINT32(ptr, k->algId); - ptr = pack_UINT16(ptr, k->encScheme); -@@ -437,6 +469,7 @@ inline BYTE* pack_TPM_SYMMETRIC_KEY(BYTE* ptr, const TPM_SYMMETRIC_KEY* k) { - return pack_BUFFER(ptr, k->data, k->size); - } - -+static - inline int unpack3_TPM_SYMMETRIC_KEY_PARMS(BYTE* ptr, UINT32* pos, UINT32 max, TPM_SYMMETRIC_KEY_PARMS* k, UnpackPtr alloc) { - return unpack3_UINT32(ptr, pos, max, &k->keyLength) || - unpack3_UINT32(ptr, pos, max, &k->blockSize) || -@@ -444,10 +477,12 @@ inline int unpack3_TPM_SYMMETRIC_KEY_PARMS(BYTE* ptr, UINT32* pos, UINT32 max, T - unpack3_PTR(ptr, pos, max, &k->IV, k->ivSize, alloc); - } - -+static - inline int sizeof_TPM_SYMMETRIC_KEY_PARMS(const TPM_SYMMETRIC_KEY_PARMS* k) { - return 12 + k->ivSize; - } - -+static - inline int unpack3_TPM_SYMMETRIC_KEY(BYTE* ptr, UINT32* pos, UINT32 max, TPM_SYMMETRIC_KEY* k, UnpackPtr alloc) { - return unpack3_UINT32(ptr, pos, max, &k->algId) || - unpack3_UINT16(ptr, pos, max, &k->encScheme) || -@@ -455,6 +490,7 @@ inline int unpack3_TPM_SYMMETRIC_KEY(BYTE* ptr, UINT32* pos, UINT32 max, TPM_SYM - unpack3_PTR(ptr, pos, max, &k->data, k->size, alloc); - } - -+static - inline BYTE* pack_TPM_RSA_KEY_PARMS(BYTE* ptr, const TPM_RSA_KEY_PARMS* k) { - ptr = pack_UINT32(ptr, k->keyLength); - ptr = pack_UINT32(ptr, k->numPrimes); -@@ -462,6 +498,7 @@ inline BYTE* pack_TPM_RSA_KEY_PARMS(BYTE* ptr, const TPM_RSA_KEY_PARMS* k) { - return pack_BUFFER(ptr, k->exponent, k->exponentSize); - } - -+static - inline int unpack3_TPM_RSA_KEY_PARMS(BYTE* ptr, UINT32* pos, UINT32 max, TPM_RSA_KEY_PARMS* k, UnpackPtr alloc) { - return unpack3_UINT32(ptr, pos, max, &k->keyLength) || - unpack3_UINT32(ptr, pos, max, &k->numPrimes) || -@@ -469,11 +506,13 @@ inline int unpack3_TPM_RSA_KEY_PARMS(BYTE* ptr, UINT32* pos, UINT32 max, TPM_RSA - unpack3_PTR(ptr, pos, max, &k->exponent, k->exponentSize, alloc); - } - -+static - inline int sizeof_TPM_RSA_KEY_PARMS(const TPM_RSA_KEY_PARMS* k) { - return 12 + k->exponentSize; - } - - -+static - inline BYTE* pack_TPM_KEY_PARMS(BYTE* ptr, const TPM_KEY_PARMS* k) { - ptr = pack_TPM_ALGORITHM_ID(ptr, k->algorithmID); - ptr = pack_TPM_ENC_SCHEME(ptr, k->encScheme); -@@ -493,6 +532,7 @@ inline BYTE* pack_TPM_KEY_PARMS(BYTE* ptr, const TPM_KEY_PARMS* k) { - return ptr; - } - -+static - inline int unpack3_TPM_KEY_PARMS(BYTE* ptr, UINT32* pos, UINT32 len, TPM_KEY_PARMS* k, UnpackPtr alloc) { - int rc = unpack3_TPM_ALGORITHM_ID(ptr, pos, len, &k->algorithmID) || - unpack3_TPM_ENC_SCHEME(ptr, pos, len, &k->encScheme) || -@@ -511,6 +551,7 @@ inline int unpack3_TPM_KEY_PARMS(BYTE* ptr, UINT32* pos, UINT32 len, TPM_KEY_PAR - return TPM_FAIL; - } - -+static - inline int sizeof_TPM_KEY_PARMS(const TPM_KEY_PARMS* k) { - int rc = 0; - rc += sizeof_TPM_ALGORITHM_ID(&k->algorithmID); -@@ -532,52 +573,62 @@ inline int sizeof_TPM_KEY_PARMS(const TPM_KEY_PARMS* k) { - return rc; - } - -+static - inline BYTE* pack_TPM_STORE_PUBKEY(BYTE* ptr, const TPM_STORE_PUBKEY* k) { - ptr = pack_UINT32(ptr, k->keyLength); - ptr = pack_BUFFER(ptr, k->key, k->keyLength); - return ptr; - } - -+static - inline int unpack3_TPM_STORE_PUBKEY(BYTE* ptr, UINT32* pos, UINT32 max, TPM_STORE_PUBKEY* k, UnpackPtr alloc) { - return unpack3_UINT32(ptr, pos, max, &k->keyLength) || - unpack3_PTR(ptr, pos, max, &k->key, k->keyLength, alloc); - } - -+static - inline int sizeof_TPM_STORE_PUBKEY(const TPM_STORE_PUBKEY* k) { - return 4 + k->keyLength; - } - -+static - inline BYTE* pack_TPM_PUBKEY(BYTE* ptr, const TPM_PUBKEY* k) { - ptr = pack_TPM_KEY_PARMS(ptr, &k->algorithmParms); - return pack_TPM_STORE_PUBKEY(ptr, &k->pubKey); - } - -+static - inline int unpack3_TPM_PUBKEY(BYTE* ptr, UINT32* pos, UINT32 len, TPM_PUBKEY* k, UnpackPtr alloc) { - return unpack3_TPM_KEY_PARMS(ptr, pos, len, &k->algorithmParms, alloc) || - unpack3_TPM_STORE_PUBKEY(ptr, pos, len, &k->pubKey, alloc); - } - -+static - inline BYTE* pack_TPM_PCR_SELECTION(BYTE* ptr, const TPM_PCR_SELECTION* p) { - ptr = pack_UINT16(ptr, p->sizeOfSelect); - ptr = pack_BUFFER(ptr, p->pcrSelect, p->sizeOfSelect); - return ptr; - } - -+static - inline BYTE* unpack_TPM_PCR_SELECTION(BYTE* ptr, TPM_PCR_SELECTION* p, UnpackPtr alloc) { - ptr = unpack_UINT16(ptr, &p->sizeOfSelect); - ptr = unpack_PTR(ptr, &p->pcrSelect, p->sizeOfSelect, alloc); - return ptr; - } - -+static - inline int unpack3_TPM_PCR_SELECTION(BYTE* ptr, UINT32* pos, UINT32 max, TPM_PCR_SELECTION* p, UnpackPtr alloc) { - return unpack3_UINT16(ptr, pos, max, &p->sizeOfSelect) || - unpack3_PTR(ptr, pos, max, &p->pcrSelect, p->sizeOfSelect, alloc); - } - -+static - inline int sizeof_TPM_PCR_SELECTION(const TPM_PCR_SELECTION* p) { - return 2 + p->sizeOfSelect; - } - -+static - inline BYTE* pack_TPM_PCR_INFO(BYTE* ptr, const TPM_PCR_INFO* p) { - ptr = pack_TPM_PCR_SELECTION(ptr, &p->pcrSelection); - ptr = pack_TPM_COMPOSITE_HASH(ptr, &p->digestAtRelease); -@@ -585,12 +636,14 @@ inline BYTE* pack_TPM_PCR_INFO(BYTE* ptr, const TPM_PCR_INFO* p) { - return ptr; - } - -+static - inline int unpack3_TPM_PCR_INFO(BYTE* ptr, UINT32* pos, UINT32 max, TPM_PCR_INFO* p, UnpackPtr alloc) { - return unpack3_TPM_PCR_SELECTION(ptr, pos, max, &p->pcrSelection, alloc) || - unpack3_TPM_COMPOSITE_HASH(ptr, pos, max, &p->digestAtRelease) || - unpack3_TPM_COMPOSITE_HASH(ptr, pos, max, &p->digestAtCreation); - } - -+static - inline int sizeof_TPM_PCR_INFO(const TPM_PCR_INFO* p) { - int rc = 0; - rc += sizeof_TPM_PCR_SELECTION(&p->pcrSelection); -@@ -599,6 +652,7 @@ inline int sizeof_TPM_PCR_INFO(const TPM_PCR_INFO* p) { - return rc; - } - -+static - inline BYTE* pack_TPM_PCR_INFO_LONG(BYTE* ptr, const TPM_PCR_INFO_LONG* p) { - ptr = pack_TPM_STRUCTURE_TAG(ptr, p->tag); - ptr = pack_TPM_LOCALITY_SELECTION(ptr, p->localityAtCreation); -@@ -610,6 +664,7 @@ inline BYTE* pack_TPM_PCR_INFO_LONG(BYTE* ptr, const TPM_PCR_INFO_LONG* p) { - return ptr; - } - -+static - inline int sizeof_TPM_PCR_INFO_LONG(const TPM_PCR_INFO_LONG* p) { - int rc = 0; - rc += sizeof_TPM_STRUCTURE_TAG(p->tag); -@@ -622,6 +677,7 @@ inline int sizeof_TPM_PCR_INFO_LONG(const TPM_PCR_INFO_LONG* p) { - return rc; - } - -+static - inline int unpack3_TPM_PCR_INFO_LONG(BYTE* ptr, UINT32* pos, UINT32 max, TPM_PCR_INFO_LONG* p, UnpackPtr alloc) { - return unpack3_TPM_STRUCTURE_TAG(ptr, pos, max, &p->tag) || - unpack3_TPM_LOCALITY_SELECTION(ptr, pos, max, -@@ -637,6 +693,7 @@ inline int unpack3_TPM_PCR_INFO_LONG(BYTE* ptr, UINT32* pos, UINT32 max, TPM_PCR - unpack3_TPM_COMPOSITE_HASH(ptr, pos, max, &p->digestAtRelease); - } - -+static - inline BYTE* pack_TPM_PCR_COMPOSITE(BYTE* ptr, const TPM_PCR_COMPOSITE* p) { - ptr = pack_TPM_PCR_SELECTION(ptr, &p->select); - ptr = pack_UINT32(ptr, p->valueSize); -@@ -644,12 +701,14 @@ inline BYTE* pack_TPM_PCR_COMPOSITE(BYTE* ptr, const TPM_PCR_COMPOSITE* p) { - return ptr; - } - -+static - inline int unpack3_TPM_PCR_COMPOSITE(BYTE* ptr, UINT32* pos, UINT32 max, TPM_PCR_COMPOSITE* p, UnpackPtr alloc) { - return unpack3_TPM_PCR_SELECTION(ptr, pos, max, &p->select, alloc) || - unpack3_UINT32(ptr, pos, max, &p->valueSize) || - unpack3_PTR(ptr, pos, max, (BYTE**)&p->pcrValue, p->valueSize, alloc); - } - -+static - inline BYTE* pack_TPM_KEY(BYTE* ptr, const TPM_KEY* k) { - ptr = pack_TPM_VERSION(ptr, &k->ver); - ptr = pack_TPM_KEY_USAGE(ptr, k->keyUsage); -@@ -665,6 +724,7 @@ inline BYTE* pack_TPM_KEY(BYTE* ptr, const TPM_KEY* k) { - return pack_BUFFER(ptr, k->encData, k->encDataSize); - } - -+static - inline int unpack3_TPM_KEY(BYTE* ptr, UINT32* pos, UINT32 max, TPM_KEY* k, UnpackPtr alloc) { - int rc = unpack3_TPM_VERSION(ptr, pos, max, &k->ver) || - unpack3_TPM_KEY_USAGE(ptr, pos, max, &k->keyUsage) || -@@ -682,6 +742,7 @@ inline int unpack3_TPM_KEY(BYTE* ptr, UINT32* pos, UINT32 max, TPM_KEY* k, Unpac - unpack3_PTR(ptr, pos, max, &k->encData, k->encDataSize, alloc); - } - -+static - inline int sizeof_TPM_KEY(const TPM_KEY* k) { - int rc = 0; - rc += sizeof_TPM_VERSION(&k->ver); -@@ -699,18 +760,21 @@ inline int sizeof_TPM_KEY(const TPM_KEY* k) { - return rc; - } - -+static - inline BYTE* pack_TPM_BOUND_DATA(BYTE* ptr, const TPM_BOUND_DATA* b, UINT32 payloadSize) { - ptr = pack_TPM_VERSION(ptr, &b->ver); - ptr = pack_TPM_PAYLOAD_TYPE(ptr, b->payload); - return pack_BUFFER(ptr, b->payloadData, payloadSize); - } - -+static - inline BYTE* unpack_TPM_BOUND_DATA(BYTE* ptr, TPM_BOUND_DATA* b, UINT32 payloadSize, UnpackPtr alloc) { - ptr = unpack_TPM_VERSION(ptr, &b->ver); - ptr = unpack_TPM_PAYLOAD_TYPE(ptr, &b->payload); - return unpack_PTR(ptr, &b->payloadData, payloadSize, alloc); - } - -+static - inline BYTE* pack_TPM_STORED_DATA(BYTE* ptr, const TPM_STORED_DATA* d) { - ptr = pack_TPM_VERSION(ptr, &d->ver); - ptr = pack_UINT32(ptr, d->sealInfoSize); -@@ -722,6 +786,7 @@ inline BYTE* pack_TPM_STORED_DATA(BYTE* ptr, const TPM_STORED_DATA* d) { - return ptr; - } - -+static - inline int sizeof_TPM_STORED_DATA(const TPM_STORED_DATA* d) { - int rv = sizeof_TPM_VERSION(&d->ver) + sizeof_UINT32(d->sealInfoSize); - if (d->sealInfoSize) { -@@ -732,6 +797,7 @@ inline int sizeof_TPM_STORED_DATA(const TPM_STORED_DATA* d) { - return rv; - } - -+static - inline int unpack3_TPM_STORED_DATA(BYTE* ptr, UINT32* pos, UINT32 len, TPM_STORED_DATA* d, UnpackPtr alloc) { - int rc = unpack3_TPM_VERSION(ptr, pos, len, &d->ver) || - unpack3_UINT32(ptr, pos, len, &d->sealInfoSize); -@@ -746,6 +812,7 @@ inline int unpack3_TPM_STORED_DATA(BYTE* ptr, UINT32* pos, UINT32 len, TPM_STORE - return rc; - } - -+static - inline BYTE* pack_TPM_STORED_DATA12(BYTE* ptr, const TPM_STORED_DATA12* d) { - ptr = pack_TPM_STRUCTURE_TAG(ptr, d->tag); - ptr = pack_TPM_ENTITY_TYPE(ptr, d->et); -@@ -758,6 +825,7 @@ inline BYTE* pack_TPM_STORED_DATA12(BYTE* ptr, const TPM_STORED_DATA12* d) { - return ptr; - } - -+static - inline int sizeof_TPM_STORED_DATA12(const TPM_STORED_DATA12* d) { - int rv = sizeof_TPM_STRUCTURE_TAG(&d->ver) + - sizeof_TPM_ENTITY_TYPE(&d->et) + -@@ -770,6 +838,7 @@ inline int sizeof_TPM_STORED_DATA12(const TPM_STORED_DATA12* d) { - return rv; - } - -+static - inline int unpack3_TPM_STORED_DATA12(BYTE* ptr, UINT32* pos, UINT32 len, TPM_STORED_DATA12* d, UnpackPtr alloc) { - int rc = unpack3_TPM_STRUCTURE_TAG(ptr, pos, len, &d->tag) || - unpack3_TPM_ENTITY_TYPE(ptr, pos, len, &d->et) || -@@ -786,6 +855,7 @@ inline int unpack3_TPM_STORED_DATA12(BYTE* ptr, UINT32* pos, UINT32 len, TPM_STO - return rc; - } - -+static - inline BYTE* pack_TPM_AUTH_SESSION(BYTE* ptr, const TPM_AUTH_SESSION* auth) { - ptr = pack_TPM_AUTH_HANDLE(ptr, auth->AuthHandle); - ptr = pack_TPM_NONCE(ptr, &auth->NonceOdd); -@@ -794,6 +864,7 @@ inline BYTE* pack_TPM_AUTH_SESSION(BYTE* ptr, const TPM_AUTH_SESSION* auth) { - return ptr; - } - -+static - inline BYTE* unpack_TPM_AUTH_SESSION(BYTE* ptr, TPM_AUTH_SESSION* auth) { - ptr = unpack_TPM_NONCE(ptr, &auth->NonceEven); - ptr = unpack_BOOL(ptr, &auth->fContinueAuthSession); -@@ -801,6 +872,7 @@ inline BYTE* unpack_TPM_AUTH_SESSION(BYTE* ptr, TPM_AUTH_SESSION* auth) { - return ptr; - } - -+static - inline int unpack3_TPM_AUTH_SESSION(BYTE* ptr, UINT32* pos, UINT32 len, TPM_AUTH_SESSION* auth) { - return unpack3_TPM_NONCE(ptr, pos, len, &auth->NonceEven) || - unpack3_BOOL(ptr, pos, len, &auth->fContinueAuthSession) || -@@ -808,6 +880,7 @@ inline int unpack3_TPM_AUTH_SESSION(BYTE* ptr, UINT32* pos, UINT32 len, TPM_AUTH - } - - -+static - inline int sizeof_TPM_AUTH_SESSION(const TPM_AUTH_SESSION* auth) { - int rv = 0; - rv += sizeof_TPM_AUTH_HANDLE(auth->AuthHandle); -@@ -817,6 +890,7 @@ inline int sizeof_TPM_AUTH_SESSION(const TPM_AUTH_SESSION* auth) { - return rv; - } - -+static - inline BYTE* pack_TPM_RQU_HEADER(BYTE* ptr, - TPM_TAG tag, - UINT32 size, -@@ -826,6 +900,7 @@ inline BYTE* pack_TPM_RQU_HEADER(BYTE* ptr, - return pack_UINT32(ptr, ord); - } - -+static - inline BYTE* unpack_TPM_RQU_HEADER(BYTE* ptr, - TPM_TAG* tag, - UINT32* size, -@@ -836,6 +911,7 @@ inline BYTE* unpack_TPM_RQU_HEADER(BYTE* ptr, - return ptr; - } - -+static - inline int unpack3_TPM_RQU_HEADER(BYTE* ptr, UINT32* pos, UINT32 max, - TPM_TAG* tag, UINT32* size, TPM_COMMAND_CODE* ord) { - return -diff --git a/stubdom/vtpmmgr/tcg.h b/stubdom/vtpmmgr/tcg.h -index 813ce57a2d..423131dc25 100644 ---- a/stubdom/vtpmmgr/tcg.h -+++ b/stubdom/vtpmmgr/tcg.h -@@ -461,6 +461,7 @@ typedef struct TPM_CAP_VERSION_INFO { - BYTE* vendorSpecific; - } TPM_CAP_VERSION_INFO; - -+static - inline void free_TPM_CAP_VERSION_INFO(TPM_CAP_VERSION_INFO* v) { - free(v->vendorSpecific); - v->vendorSpecific = NULL; -@@ -494,6 +495,7 @@ typedef struct TPM_SYMMETRIC_KEY { - BYTE* data; - } TPM_SYMMETRIC_KEY; - -+static - inline void free_TPM_SYMMETRIC_KEY_PARMS(TPM_SYMMETRIC_KEY_PARMS* p) { - free(p->IV); - p->IV = NULL; -@@ -510,6 +512,7 @@ typedef struct TPM_RSA_KEY_PARMS { - - #define TPM_RSA_KEY_PARMS_INIT { 0, 0, 0, NULL } - -+static - inline void free_TPM_RSA_KEY_PARMS(TPM_RSA_KEY_PARMS* p) { - free(p->exponent); - p->exponent = NULL; -@@ -528,6 +531,7 @@ typedef struct TPM_KEY_PARMS { - - #define TPM_KEY_PARMS_INIT { 0, 0, 0, 0 } - -+static - inline void free_TPM_KEY_PARMS(TPM_KEY_PARMS* p) { - if(p->parmSize) { - switch(p->algorithmID) { -@@ -550,6 +554,7 @@ typedef struct TPM_STORE_PUBKEY { - - #define TPM_STORE_PUBKEY_INIT { 0, NULL } - -+static - inline void free_TPM_STORE_PUBKEY(TPM_STORE_PUBKEY* p) { - free(p->key); - p->key = NULL; -@@ -562,6 +567,7 @@ typedef struct TPM_PUBKEY { - - #define TPM_PUBKEY_INIT { TPM_KEY_PARMS_INIT, TPM_STORE_PUBKEY_INIT } - -+static - inline void free_TPM_PUBKEY(TPM_PUBKEY* k) { - free_TPM_KEY_PARMS(&k->algorithmParms); - free_TPM_STORE_PUBKEY(&k->pubKey); -@@ -574,6 +580,7 @@ typedef struct TPM_PCR_SELECTION { - - #define TPM_PCR_SELECTION_INIT { 0, NULL } - -+static - inline void free_TPM_PCR_SELECTION(TPM_PCR_SELECTION* p) { - free(p->pcrSelect); - p->pcrSelect = NULL; -@@ -594,6 +601,7 @@ typedef struct TPM_PCR_INFO_LONG { - #define TPM_PCR_INFO_LONG_INIT { 0, 0, 0, TPM_PCR_SELECTION_INIT, \ - TPM_PCR_SELECTION_INIT } - -+static - inline void free_TPM_PCR_INFO_LONG(TPM_PCR_INFO_LONG* p) { - free_TPM_PCR_SELECTION(&p->creationPCRSelection); - free_TPM_PCR_SELECTION(&p->releasePCRSelection); -@@ -607,6 +615,7 @@ typedef struct TPM_PCR_INFO { - - #define TPM_PCR_INFO_INIT { TPM_PCR_SELECTION_INIT } - -+static - inline void free_TPM_PCR_INFO(TPM_PCR_INFO* p) { - free_TPM_PCR_SELECTION(&p->pcrSelection); - } -@@ -619,6 +628,7 @@ typedef struct TPM_PCR_COMPOSITE { - - #define TPM_PCR_COMPOSITE_INIT { TPM_PCR_SELECTION_INIT, 0, NULL } - -+static - inline void free_TPM_PCR_COMPOSITE(TPM_PCR_COMPOSITE* p) { - free_TPM_PCR_SELECTION(&p->select); - free(p->pcrValue); -@@ -643,6 +653,7 @@ typedef struct TPM_KEY { - .pubKey = TPM_STORE_PUBKEY_INIT, \ - .encDataSize = 0, .encData = NULL } - -+static - inline void free_TPM_KEY(TPM_KEY* k) { - if(k->PCRInfoSize) { - free_TPM_PCR_INFO(&k->PCRInfo); -@@ -660,6 +671,7 @@ typedef struct TPM_BOUND_DATA { - - #define TPM_BOUND_DATA_INIT { .payloadData = NULL } - -+static - inline void free_TPM_BOUND_DATA(TPM_BOUND_DATA* d) { - free(d->payloadData); - d->payloadData = NULL; -@@ -676,6 +688,7 @@ typedef struct TPM_STORED_DATA { - #define TPM_STORED_DATA_INIT { .sealInfoSize = 0, sealInfo = TPM_PCR_INFO_INIT,\ - .encDataSize = 0, .encData = NULL } - -+static - inline void free_TPM_STORED_DATA(TPM_STORED_DATA* d) { - if(d->sealInfoSize) { - free_TPM_PCR_INFO(&d->sealInfo); -@@ -696,6 +709,7 @@ typedef struct TPM_STORED_DATA12 { - #define TPM_STORED_DATA12_INIT { .sealInfoLongSize = 0, \ - sealInfoLong = TPM_PCR_INFO_INIT, .encDataSize = 0, .encData = NULL } - -+static - inline void free_TPM_STORED_DATA12(TPM_STORED_DATA12* d) { - if(d->sealInfoLongSize) { - free_TPM_PCR_INFO_LONG(&d->sealInfoLong); -diff --git a/stubdom/vtpmmgr/tpm2_marshal.h b/stubdom/vtpmmgr/tpm2_marshal.h -index aaa44645a2..ba070ad38e 100644 ---- a/stubdom/vtpmmgr/tpm2_marshal.h -+++ b/stubdom/vtpmmgr/tpm2_marshal.h -@@ -52,6 +52,7 @@ - #define pack_TPM_BUFFER(ptr, buf, size) pack_BUFFER(ptr, buf, size) - #define unpack_TPM_BUFFER(ptr, buf, size) unpack_BUFFER(ptr, buf, size) - -+static - inline BYTE* pack_BYTE_ARRAY(BYTE* ptr, const BYTE* array, UINT32 size) - { - int i; -@@ -60,21 +61,25 @@ inline BYTE* pack_BYTE_ARRAY(BYTE* ptr, const BYTE* array, UINT32 size) - return ptr; - } - -+static - inline BYTE* pack_TPMA_SESSION(BYTE* ptr, const TPMA_SESSION *attr) - { - return pack_BYTE(ptr, (BYTE)(*attr)); - } - -+static - inline BYTE* unpack_TPMA_SESSION(BYTE* ptr, TPMA_SESSION *attr) - { - return unpack_BYTE(ptr, (BYTE *)attr); - } - -+static - inline BYTE* pack_TPMI_ALG_HASH(BYTE* ptr, const TPMI_ALG_HASH *hash) - { - return pack_UINT16(ptr, *hash); - } - -+static - inline BYTE* unpack_TPMI_ALG_HASH(BYTE *ptr, TPMI_ALG_HASH *hash) - { - return unpack_UINT16(ptr, hash); -@@ -125,6 +130,7 @@ inline BYTE* unpack_TPMI_ALG_HASH(BYTE *ptr, TPMI_ALG_HASH *hash) - #define pack_TPMI_RH_LOCKOUT(ptr, l) pack_TPM2_HANDLE(ptr, l) - #define unpack_TPMI_RH_LOCKOUT(ptr, l) unpack_TPM2_HANDLE(ptr, l) - -+static - inline BYTE* pack_TPM2B_DIGEST(BYTE* ptr, const TPM2B_DIGEST *digest) - { - ptr = pack_UINT16(ptr, digest->size); -@@ -132,6 +138,7 @@ inline BYTE* pack_TPM2B_DIGEST(BYTE* ptr, const TPM2B_DIGEST *digest) - return ptr; - } - -+static - inline BYTE* unpack_TPM2B_DIGEST(BYTE* ptr, TPM2B_DIGEST *digest) - { - ptr = unpack_UINT16(ptr, &digest->size); -@@ -139,6 +146,7 @@ inline BYTE* unpack_TPM2B_DIGEST(BYTE* ptr, TPM2B_DIGEST *digest) - return ptr; - } - -+static - inline BYTE* pack_TPMT_TK_CREATION(BYTE* ptr,const TPMT_TK_CREATION *ticket ) - { - ptr = pack_TPM_ST(ptr , &ticket->tag); -@@ -147,6 +155,7 @@ inline BYTE* pack_TPMT_TK_CREATION(BYTE* ptr,const TPMT_TK_CREATION *ticket ) - return ptr; - } - -+static - inline BYTE* unpack_TPMT_TK_CREATION(BYTE* ptr, TPMT_TK_CREATION *ticket ) - { - ptr = unpack_TPM_ST(ptr, &ticket->tag); -@@ -155,6 +164,7 @@ inline BYTE* unpack_TPMT_TK_CREATION(BYTE* ptr, TPMT_TK_CREATION *ticket ) - return ptr; - } - -+static - inline BYTE* pack_TPM2B_NAME(BYTE* ptr,const TPM2B_NAME *name ) - { - ptr = pack_UINT16(ptr, name->size); -@@ -162,6 +172,7 @@ inline BYTE* pack_TPM2B_NAME(BYTE* ptr,const TPM2B_NAME *name ) - return ptr; - } - -+static - inline BYTE* unpack_TPM2B_NAME(BYTE* ptr, TPM2B_NAME *name) - { - ptr = unpack_UINT16(ptr, &name->size); -@@ -169,6 +180,7 @@ inline BYTE* unpack_TPM2B_NAME(BYTE* ptr, TPM2B_NAME *name) - return ptr; - } - -+static - inline BYTE* pack_TPM2B_NONCE(BYTE* ptr, const TPM2B_NONCE *nonce) - { - return pack_TPM2B_DIGEST(ptr, (const TPM2B_DIGEST*)nonce); -@@ -176,6 +188,7 @@ inline BYTE* pack_TPM2B_NONCE(BYTE* ptr, const TPM2B_NONCE *nonce) - - #define unpack_TPM2B_NONCE(ptr, nonce) unpack_TPM2B_DIGEST(ptr, (TPM2B_DIGEST*)nonce) - -+static - inline BYTE* pack_TPM2B_AUTH(BYTE* ptr, const TPM2B_AUTH *auth) - { - return pack_TPM2B_DIGEST(ptr, (const TPM2B_DIGEST*)auth); -@@ -183,6 +196,7 @@ inline BYTE* pack_TPM2B_AUTH(BYTE* ptr, const TPM2B_AUTH *auth) - - #define unpack_TPM2B_AUTH(ptr, auth) unpack_TPM2B_DIGEST(ptr, (TPM2B_DIGEST*)auth) - -+static - inline BYTE* pack_TPM2B_DATA(BYTE* ptr, const TPM2B_DATA *data) - { - return pack_TPM2B_DIGEST(ptr, (const TPM2B_DIGEST*)data); -@@ -190,6 +204,7 @@ inline BYTE* pack_TPM2B_DATA(BYTE* ptr, const TPM2B_DATA *data) - - #define unpack_TPM2B_DATA(ptr, data) unpack_TPM2B_DIGEST(ptr, (TPM2B_DIGEST*)data) - -+static - inline BYTE* pack_TPM2B_SENSITIVE_DATA(BYTE* ptr, const TPM2B_SENSITIVE_DATA *data) - { - return pack_TPM2B_DIGEST(ptr, (const TPM2B_DIGEST*)data); -@@ -197,6 +212,7 @@ inline BYTE* pack_TPM2B_SENSITIVE_DATA(BYTE* ptr, const TPM2B_SENSITIVE_DATA *da - - #define unpack_TPM2B_SENSITIVE_DATA(ptr, data) unpack_TPM2B_DIGEST(ptr, (TPM2B_DIGEST*)data) - -+static - inline BYTE* pack_TPM2B_PUBLIC_KEY_RSA(BYTE* ptr, const TPM2B_PUBLIC_KEY_RSA *rsa) - { - return pack_TPM2B_DIGEST(ptr, (const TPM2B_DIGEST*)rsa); -@@ -204,6 +220,7 @@ inline BYTE* pack_TPM2B_PUBLIC_KEY_RSA(BYTE* ptr, const TPM2B_PUBLIC_KEY_RSA *rs - - #define unpack_TPM2B_PUBLIC_KEY_RSA(ptr, rsa) unpack_TPM2B_DIGEST(ptr, (TPM2B_DIGEST*)rsa) - -+static - inline BYTE* pack_TPM2B_PRIVATE(BYTE* ptr, const TPM2B_PRIVATE *Private) - { - ptr = pack_UINT16(ptr, Private->size); -@@ -211,6 +228,7 @@ inline BYTE* pack_TPM2B_PRIVATE(BYTE* ptr, const TPM2B_PRIVATE *Private) - return ptr; - } - -+static - inline BYTE* unpack_TPM2B_PRIVATE(BYTE* ptr, TPM2B_PRIVATE *Private) - { - ptr = unpack_UINT16(ptr, &Private->size); -@@ -218,6 +236,7 @@ inline BYTE* unpack_TPM2B_PRIVATE(BYTE* ptr, TPM2B_PRIVATE *Private) - return ptr; - } - -+static - inline BYTE* pack_TPMS_PCR_SELECTION_ARRAY(BYTE* ptr, const TPMS_PCR_SELECTION *sel, UINT32 count) - { - int i; -@@ -229,6 +248,7 @@ inline BYTE* pack_TPMS_PCR_SELECTION_ARRAY(BYTE* ptr, const TPMS_PCR_SELECTION * - return ptr; - } - -+static - inline BYTE* unpack_TPMS_PCR_SELECTION_ARRAY(BYTE* ptr, TPMS_PCR_SELECTION *sel, UINT32 count) - { - int i; -@@ -240,6 +260,7 @@ inline BYTE* unpack_TPMS_PCR_SELECTION_ARRAY(BYTE* ptr, TPMS_PCR_SELECTION *sel, - return ptr; - } - -+static - inline BYTE* pack_TPML_PCR_SELECTION(BYTE* ptr, const TPML_PCR_SELECTION *sel) - { - ptr = pack_UINT32(ptr, sel->count); -@@ -247,6 +268,7 @@ inline BYTE* pack_TPML_PCR_SELECTION(BYTE* ptr, const TPML_PCR_SELECTION *sel) - return ptr; - } - -+static - inline BYTE* unpack_TPML_PCR_SELECTION(BYTE* ptr, TPML_PCR_SELECTION *sel) - { - ptr = unpack_UINT32(ptr, &sel->count); -@@ -254,6 +276,7 @@ inline BYTE* unpack_TPML_PCR_SELECTION(BYTE* ptr, TPML_PCR_SELECTION *sel) - return ptr; - } - -+static - inline BYTE* unpack_TPML_DIGEST(BYTE* ptr,TPML_DIGEST *digest) - { - int i; -@@ -265,6 +288,7 @@ inline BYTE* unpack_TPML_DIGEST(BYTE* ptr,TPML_DIGEST *digest) - return ptr; - } - -+static - inline BYTE* pack_TPMS_CREATION_DATA(BYTE* ptr,const TPMS_CREATION_DATA *data) - { - ptr = pack_TPML_PCR_SELECTION(ptr, &data->pcrSelect); -@@ -276,6 +300,7 @@ inline BYTE* pack_TPMS_CREATION_DATA(BYTE* ptr,const TPMS_CREATION_DATA *data) - return ptr; - } - -+static - inline BYTE* unpack_TPMS_CREATION_DATA(BYTE* ptr, TPMS_CREATION_DATA *data) - { - ptr = unpack_TPML_PCR_SELECTION(ptr, &data->pcrSelect); -@@ -288,6 +313,7 @@ inline BYTE* unpack_TPMS_CREATION_DATA(BYTE* ptr, TPMS_CREATION_DATA *data) - return ptr; - } - -+static - inline BYTE* pack_TPM2B_CREATION_DATA(BYTE* ptr, const TPM2B_CREATION_DATA *data ) - { - ptr = pack_UINT16(ptr, data->size); -@@ -295,6 +321,7 @@ inline BYTE* pack_TPM2B_CREATION_DATA(BYTE* ptr, const TPM2B_CREATION_DATA *data - return ptr; - } - -+static - inline BYTE* unpack_TPM2B_CREATION_DATA(BYTE* ptr, TPM2B_CREATION_DATA * data) - { - ptr = unpack_UINT16(ptr, &data->size); -@@ -302,6 +329,7 @@ inline BYTE* unpack_TPM2B_CREATION_DATA(BYTE* ptr, TPM2B_CREATION_DATA * data) - return ptr; - } - -+static - inline BYTE* pack_TPMS_SENSITIVE_CREATE(BYTE* ptr, const TPMS_SENSITIVE_CREATE *create) - { - ptr = pack_TPM2B_AUTH(ptr, &create->userAuth); -@@ -309,6 +337,7 @@ inline BYTE* pack_TPMS_SENSITIVE_CREATE(BYTE* ptr, const TPMS_SENSITIVE_CREATE * - return ptr; - } - -+static - inline BYTE* pack_TPM2B_SENSITIVE_CREATE(BYTE* ptr, const TPM2B_SENSITIVE_CREATE *create) - { - BYTE* sizePtr = ptr; -@@ -318,6 +347,7 @@ inline BYTE* pack_TPM2B_SENSITIVE_CREATE(BYTE* ptr, const TPM2B_SENSITIVE_CREATE - return ptr; - } - -+static - inline BYTE* pack_TPMU_SYM_MODE(BYTE* ptr, const TPMU_SYM_MODE *p, - const TPMI_ALG_SYM_OBJECT *sel) - { -@@ -336,6 +366,7 @@ inline BYTE* pack_TPMU_SYM_MODE(BYTE* ptr, const TPMU_SYM_MODE *p, - } - return ptr; - } -+static - inline BYTE* unpack_TPMU_SYM_MODE(BYTE* ptr, TPMU_SYM_MODE *p, - const TPMI_ALG_SYM_OBJECT *sel) - { -@@ -355,6 +386,7 @@ inline BYTE* unpack_TPMU_SYM_MODE(BYTE* ptr, TPMU_SYM_MODE *p, - return ptr; - } - -+static - inline BYTE* pack_TPMU_SYM_KEY_BITS(BYTE* ptr, const TPMU_SYM_KEY_BITS *p, - const TPMI_ALG_SYM_OBJECT *sel) - { -@@ -376,6 +408,7 @@ inline BYTE* pack_TPMU_SYM_KEY_BITS(BYTE* ptr, const TPMU_SYM_KEY_BITS *p, - return ptr; - } - -+static - inline BYTE* unpack_TPMU_SYM_KEY_BITS(BYTE* ptr, TPMU_SYM_KEY_BITS *p, - const TPMI_ALG_SYM_OBJECT *sel) - { -@@ -397,6 +430,7 @@ inline BYTE* unpack_TPMU_SYM_KEY_BITS(BYTE* ptr, TPMU_SYM_KEY_BITS *p, - return ptr; - } - -+static - inline BYTE* pack_TPMT_SYM_DEF_OBJECT(BYTE* ptr, const TPMT_SYM_DEF_OBJECT *p) - { - ptr = pack_TPMI_ALG_SYM_OBJECT(ptr, &p->algorithm); -@@ -405,6 +439,7 @@ inline BYTE* pack_TPMT_SYM_DEF_OBJECT(BYTE* ptr, const TPMT_SYM_DEF_OBJECT *p) - return ptr; - } - -+static - inline BYTE* unpack_TPMT_SYM_DEF_OBJECT(BYTE *ptr, TPMT_SYM_DEF_OBJECT *p) - { - ptr = unpack_TPMI_ALG_SYM_OBJECT(ptr, &p->algorithm); -@@ -416,6 +451,7 @@ inline BYTE* unpack_TPMT_SYM_DEF_OBJECT(BYTE *ptr, TPMT_SYM_DEF_OBJECT *p) - #define pack_TPMS_SCHEME_OAEP(p, t) pack_TPMI_ALG_HASH(p, &((t)->hashAlg)) - #define unpack_TPMS_SCHEME_OAEP(p, t) unpack_TPMI_ALG_HASH(p, &((t)->hashAlg)) - -+static - inline BYTE* pack_TPMU_ASYM_SCHEME(BYTE *ptr, const TPMU_ASYM_SCHEME *p, - const TPMI_ALG_RSA_SCHEME *s) - { -@@ -438,6 +474,7 @@ inline BYTE* pack_TPMU_ASYM_SCHEME(BYTE *ptr, const TPMU_ASYM_SCHEME *p, - return ptr; - } - -+static - inline BYTE* unpack_TPMU_ASYM_SCHEME(BYTE *ptr, TPMU_ASYM_SCHEME *p, - const TPMI_ALG_RSA_SCHEME *s) - { -@@ -462,6 +499,7 @@ inline BYTE* unpack_TPMU_ASYM_SCHEME(BYTE *ptr, TPMU_ASYM_SCHEME *p, - return ptr; - } - -+static - inline BYTE* pack_TPMT_RSA_SCHEME(BYTE* ptr, const TPMT_RSA_SCHEME *p) - { - ptr = pack_TPMI_ALG_RSA_SCHEME(ptr, &p->scheme); -@@ -469,6 +507,7 @@ inline BYTE* pack_TPMT_RSA_SCHEME(BYTE* ptr, const TPMT_RSA_SCHEME *p) - return ptr; - } - -+static - inline BYTE* unpack_TPMT_RSA_SCHEME(BYTE* ptr, TPMT_RSA_SCHEME *p) - { - ptr = unpack_TPMI_ALG_RSA_SCHEME(ptr, &p->scheme); -@@ -476,6 +515,7 @@ inline BYTE* unpack_TPMT_RSA_SCHEME(BYTE* ptr, TPMT_RSA_SCHEME *p) - return ptr; - } - -+static - inline BYTE* pack_TPMT_RSA_DECRYPT(BYTE* ptr, const TPMT_RSA_DECRYPT *p) - { - ptr = pack_TPMI_ALG_RSA_SCHEME(ptr, &p->scheme); -@@ -483,6 +523,7 @@ inline BYTE* pack_TPMT_RSA_DECRYPT(BYTE* ptr, const TPMT_RSA_DECRYPT *p) - return ptr; - } - -+static - inline BYTE* pack_TPMS_RSA_PARMS(BYTE* ptr, const TPMS_RSA_PARMS *p) - { - ptr = pack_TPMT_SYM_DEF_OBJECT(ptr, &p->symmetric); -@@ -492,6 +533,7 @@ inline BYTE* pack_TPMS_RSA_PARMS(BYTE* ptr, const TPMS_RSA_PARMS *p) - return ptr; - } - -+static - inline BYTE* unpack_TPMS_RSA_PARMS(BYTE *ptr, TPMS_RSA_PARMS *p) - { - ptr = unpack_TPMT_SYM_DEF_OBJECT(ptr, &p->symmetric); -@@ -501,6 +543,7 @@ inline BYTE* unpack_TPMS_RSA_PARMS(BYTE *ptr, TPMS_RSA_PARMS *p) - return ptr; - } - -+static - inline BYTE* pack_TPMU_PUBLIC_PARMS(BYTE* ptr, const TPMU_PUBLIC_PARMS *param, - const TPMI_ALG_PUBLIC *selector) - { -@@ -518,6 +561,7 @@ inline BYTE* pack_TPMU_PUBLIC_PARMS(BYTE* ptr, const TPMU_PUBLIC_PARMS *param, - return NULL; - } - -+static - inline BYTE* unpack_TPMU_PUBLIC_PARMS(BYTE* ptr, TPMU_PUBLIC_PARMS *param, - const TPMI_ALG_PUBLIC *selector) - { -@@ -535,18 +579,21 @@ inline BYTE* unpack_TPMU_PUBLIC_PARMS(BYTE* ptr, TPMU_PUBLIC_PARMS *param, - return NULL; - } - -+static - inline BYTE* pack_TPMS_ECC_POINT(BYTE* ptr, const TPMS_ECC_POINT *point) - { - assert(false); - return ptr; - } - -+static - inline BYTE* unpack_TPMS_ECC_POINT(BYTE* ptr, TPMS_ECC_POINT *point) - { - assert(false); - return ptr; - } - -+static - inline BYTE* pack_TPMU_PUBLIC_ID(BYTE* ptr, const TPMU_PUBLIC_ID *id, - const TPMI_ALG_PUBLIC *selector) - { -@@ -564,6 +611,7 @@ inline BYTE* pack_TPMU_PUBLIC_ID(BYTE* ptr, const TPMU_PUBLIC_ID *id, - return NULL; - } - -+static - inline BYTE* unpack_TPMU_PUBLIC_ID(BYTE* ptr, TPMU_PUBLIC_ID *id, TPMI_ALG_PUBLIC *selector) - { - switch (*selector) { -@@ -580,6 +628,7 @@ inline BYTE* unpack_TPMU_PUBLIC_ID(BYTE* ptr, TPMU_PUBLIC_ID *id, TPMI_ALG_PUBLI - return NULL; - } - -+static - inline BYTE* pack_TPMT_PUBLIC(BYTE* ptr, const TPMT_PUBLIC *public) - { - ptr = pack_TPMI_ALG_PUBLIC(ptr, &public->type); -@@ -591,6 +640,7 @@ inline BYTE* pack_TPMT_PUBLIC(BYTE* ptr, const TPMT_PUBLIC *public) - return ptr; - } - -+static - inline BYTE* unpack_TPMT_PUBLIC(BYTE* ptr, TPMT_PUBLIC *public) - { - ptr = unpack_TPMI_ALG_PUBLIC(ptr, &public->type); -@@ -602,6 +652,7 @@ inline BYTE* unpack_TPMT_PUBLIC(BYTE* ptr, TPMT_PUBLIC *public) - return ptr; - } - -+static - inline BYTE* pack_TPM2B_PUBLIC(BYTE* ptr, const TPM2B_PUBLIC *public) - { - BYTE *sizePtr = ptr; -@@ -611,6 +662,7 @@ inline BYTE* pack_TPM2B_PUBLIC(BYTE* ptr, const TPM2B_PUBLIC *public) - return ptr; - } - -+static - inline BYTE* unpack_TPM2B_PUBLIC(BYTE* ptr, TPM2B_PUBLIC *public) - { - ptr = unpack_UINT16(ptr, &public->size); -@@ -618,6 +670,7 @@ inline BYTE* unpack_TPM2B_PUBLIC(BYTE* ptr, TPM2B_PUBLIC *public) - return ptr; - } - -+static - inline BYTE* pack_TPMS_PCR_SELECTION(BYTE* ptr, const TPMS_PCR_SELECTION *selection) - { - ptr = pack_TPMI_ALG_HASH(ptr, &selection->hash); -@@ -626,6 +679,7 @@ inline BYTE* pack_TPMS_PCR_SELECTION(BYTE* ptr, const TPMS_PCR_SELECTION *select - return ptr; - } - -+static - inline BYTE* pack_TPMS_PCR_SELECTION_Array(BYTE* ptr, const TPMS_PCR_SELECTION *selections, - const UINT32 cnt) - { -@@ -635,6 +689,7 @@ inline BYTE* pack_TPMS_PCR_SELECTION_Array(BYTE* ptr, const TPMS_PCR_SELECTION * - return ptr; - } - -+static - inline BYTE* pack_TPM_AuthArea(BYTE* ptr, const TPM_AuthArea *auth) - { - BYTE* sizePtr = ptr; -@@ -647,6 +702,7 @@ inline BYTE* pack_TPM_AuthArea(BYTE* ptr, const TPM_AuthArea *auth) - return ptr; - } - -+static - inline BYTE* unpack_TPM_AuthArea(BYTE* ptr, TPM_AuthArea *auth) - { - ptr = unpack_UINT32(ptr, &auth->size); -@@ -657,6 +713,7 @@ inline BYTE* unpack_TPM_AuthArea(BYTE* ptr, TPM_AuthArea *auth) - return ptr; - } - -+static - inline BYTE* pack_TPM2_RSA_KEY(BYTE* ptr, const TPM2_RSA_KEY *key) - { - ptr = pack_TPM2B_PRIVATE(ptr, &key->Private); -@@ -664,6 +721,7 @@ inline BYTE* pack_TPM2_RSA_KEY(BYTE* ptr, const TPM2_RSA_KEY *key) - return ptr; - } - -+static - inline BYTE* unpack_TPM2_RSA_KEY(BYTE* ptr, TPM2_RSA_KEY *key) - { - ptr = unpack_TPM2B_PRIVATE(ptr, &key->Private); -diff --git a/stubdom/vtpmmgr/tpmrsa.h b/stubdom/vtpmmgr/tpmrsa.h -index 08213bbb7a..65fd32a45c 100644 ---- a/stubdom/vtpmmgr/tpmrsa.h -+++ b/stubdom/vtpmmgr/tpmrsa.h -@@ -62,6 +62,7 @@ TPM_RESULT tpmrsa_pub_encrypt_oaep( tpmrsa_context *ctx, - unsigned char *output ); - - /* free tpmrsa key */ -+static - inline void tpmrsa_free( tpmrsa_context *ctx ) { - mpi_free( &ctx->RN ); mpi_free( &ctx->E ); mpi_free( &ctx->N ); - } - -_______________________________________________ -Xen-devel mailing list -Xen-devel@lists.xen.org -https://lists.xen.org/xen-devel diff --git a/pcr/xen/patch-ipxe-patches-series.patch b/pcr/xen/patch-ipxe-patches-series.patch deleted file mode 100644 index 30e916417..000000000 --- a/pcr/xen/patch-ipxe-patches-series.patch +++ /dev/null @@ -1,18 +0,0 @@ -Subject: [PATCH] Fix gcc7 warn - ---- - tools/firmware/etherboot/patches/series | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tools/firmware/etherboot/patches/series b/tools/firmware/etherboot/patches/series -index 86cb300..780c6c6 100644 ---- a/tools/firmware/etherboot/patches/series -+++ b/tools/firmware/etherboot/patches/series -@@ -1 +1,4 @@ - boot_prompt_option.patch -+patch-inbuild-ipxe-gcc7-implicit-fallthrough.patch -+patch-inbuild-ipxe-gcc7-implicit-fallthrough-ath5k.patch -+patch-inbuild-ipxe-gcc7-implicit-fallthrough-curses.patch --- -2.13.0 - diff --git a/pcr/xen/patch-ovmf-apply-inbuild-patches.patch b/pcr/xen/patch-ovmf-apply-inbuild-patches.patch deleted file mode 100644 index 2c2f3ed75..000000000 --- a/pcr/xen/patch-ovmf-apply-inbuild-patches.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 088d0d605131eeb43dc1c4ab21631ea7e51f8501 Mon Sep 17 00:00:00 2001 -From: John Thomson <git@johnthomson.fastmail.com.au> -Date: Sat, 24 Jun 2017 09:38:13 +1000 -Subject: [PATCH] Fix OVMF apply patches series - ---- - tools/firmware/Makefile | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile -index a5a6802..875e7e5 100644 ---- a/tools/firmware/Makefile -+++ b/tools/firmware/Makefile -@@ -20,6 +20,9 @@ ovmf-dir: - sed 's|python |python2 |g' -i "ovmf-dir/BaseTools/BinWrappers/PosixLike"/* || true - sed 's|python |python2 |g' -i "ovmf-dir/BaseTools/Tests/GNUmakefile" - cp ovmf-makefile ovmf-dir/Makefile; -+ for i in $$(cat ovmf-patches/series); do \ -+ patch -d ovmf-dir -Np1 < ovmf-patches/$$i || exit 1; \ -+ done - - seabios-dir: - GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_REVISION) seabios-dir --- -2.13.1 - diff --git a/pcr/xen/patch-ovmf-patches-series.patch b/pcr/xen/patch-ovmf-patches-series.patch deleted file mode 100644 index 0f230e504..000000000 --- a/pcr/xen/patch-ovmf-patches-series.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 30f9f61c42b9530332a856a5bc09db52c446289d Mon Sep 17 00:00:00 2001 -From: John Thomson <git@johnthomson.fastmail.com.au> -Date: Sat, 24 Jun 2017 09:48:02 +1000 -Subject: [PATCH] Add ovmf patches series file - ---- - tools/firmware/ovmf-patches/series | 1 + - 1 file changed, 1 insertion(+) - create mode 100644 tools/firmware/ovmf-patches/series - -diff --git a/tools/firmware/ovmf-patches/series b/tools/firmware/ovmf-patches/series -new file mode 100644 -index 0000000..ac6bda5 ---- /dev/null -+++ b/tools/firmware/ovmf-patches/series -@@ -0,0 +1 @@ -+patch-inbuild-ovmf-5-hiilib.c-pointer-zero.patch --- -2.13.1 - diff --git a/pcr/xen/xen.install b/pcr/xen/xen.install index f629e6643..2c03573e7 100644 --- a/pcr/xen/xen.install +++ b/pcr/xen/xen.install @@ -34,7 +34,6 @@ GRUB_DEFAULT="xen-gnulinux-simple-a-unique-id-from-your-grub-goes-here" run grub-mkconfig ########## - Direct EFI boot preperation: Create a xen.cfg file in the same directory as xen.efi. These need to be in ESP, or in a directory accessible from you EFI bootloader. @@ -54,6 +53,7 @@ install_msg() { In order to complete the installation, and enable Xen, at the very least you must: + 1. Configure your bootloader to boot Xen: __EOF__ xen_boot |