pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/xentools413



Module Name:    pkgsrc
Committed By:   bouyer
Date:           Thu Aug 27 08:22:33 UTC 2020

Modified Files:
        pkgsrc/sysutils/xentools413: MESSAGE.NetBSD Makefile PLIST distinfo
        pkgsrc/sysutils/xentools413/patches:
            patch-tools_debugger_gdbsx_xg_xg_main.c
            patch-tools_firmware_etherboot_Makefile
            patch-tools_libs_call_private.h patch-tools_libs_evtchn_netbsd.c
Added Files:
        pkgsrc/sysutils/xentools413/patches: patch-XSA335
            patch-tools_firmware_Makefile patch-tools_include_Makefile
            patch-tools_libxc_xc_private.h patch-tools_libxl_libxl_netbsd.c
            patch-tools_ocaml_libs_eventchn_xeneventchn_stubs.c
Removed Files:
        pkgsrc/sysutils/xentools413/patches:
            patch-tools_include_xen-sys_NetBSD_gntdev.h

Log Message:
Always use system-supplied IOCTL definitions, remove xen-provided
include files.
Build seabios and ipxe, they're needed by qemu-xen (ipxe not strictly
needed but it's convenient to have)
Switch default device model from qemu-xen-traditional to qemu-xen
(the former being unmaintained)
Add upstream patch for XSA335 security issue.
Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/sysutils/xentools413/MESSAGE.NetBSD \
    pkgsrc/sysutils/xentools413/PLIST pkgsrc/sysutils/xentools413/distinfo
cvs rdiff -u -r1.7 -r1.8 pkgsrc/sysutils/xentools413/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/xentools413/patches/patch-XSA335 \
    pkgsrc/sysutils/xentools413/patches/patch-tools_firmware_Makefile \
    pkgsrc/sysutils/xentools413/patches/patch-tools_include_Makefile \
    pkgsrc/sysutils/xentools413/patches/patch-tools_libxc_xc_private.h \
    pkgsrc/sysutils/xentools413/patches/patch-tools_libxl_libxl_netbsd.c \
    pkgsrc/sysutils/xentools413/patches/patch-tools_ocaml_libs_eventchn_xeneventchn_stubs.c
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/sysutils/xentools413/patches/patch-tools_debugger_gdbsx_xg_xg_main.c \
    pkgsrc/sysutils/xentools413/patches/patch-tools_firmware_etherboot_Makefile \
    pkgsrc/sysutils/xentools413/patches/patch-tools_libs_call_private.h \
    pkgsrc/sysutils/xentools413/patches/patch-tools_libs_evtchn_netbsd.c
cvs rdiff -u -r1.1 -r0 \
    pkgsrc/sysutils/xentools413/patches/patch-tools_include_xen-sys_NetBSD_gntdev.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/xentools413/MESSAGE.NetBSD
diff -u pkgsrc/sysutils/xentools413/MESSAGE.NetBSD:1.1 pkgsrc/sysutils/xentools413/MESSAGE.NetBSD:1.2
--- pkgsrc/sysutils/xentools413/MESSAGE.NetBSD:1.1      Tue May 26 11:12:10 2020
+++ pkgsrc/sysutils/xentools413/MESSAGE.NetBSD  Thu Aug 27 08:22:33 2020
@@ -1,5 +1,5 @@
 ===========================================================================
-$NetBSD: MESSAGE.NetBSD,v 1.1 2020/05/26 11:12:10 bouyer Exp $
+$NetBSD: MESSAGE.NetBSD,v 1.2 2020/08/27 08:22:33 bouyer Exp $
 
 Please ensure that the Xen-specific devices needed by xend(8) exist:
 
@@ -15,3 +15,11 @@ creating a Xen setup:
        http://www.NetBSD.org/ports/xen/howto.html
 
 ===========================================================================
+WARNING: this version switches from the unmaintained qemu-xen-traditional
+(aka qemu-dm) to qemu-upstream (aka qemu-system-i386, aka qemu-xen).
+To switch back to qemu-xen-traditional add
+device_model_version='qemu-xen-traditional'
+to your HVM domain config file.
+Use of qemu-xen-traditional is deprecated and is not recommened. It may have
+security issues.
+===========================================================================
Index: pkgsrc/sysutils/xentools413/PLIST
diff -u pkgsrc/sysutils/xentools413/PLIST:1.1 pkgsrc/sysutils/xentools413/PLIST:1.2
--- pkgsrc/sysutils/xentools413/PLIST:1.1       Tue May 26 11:12:10 2020
+++ pkgsrc/sysutils/xentools413/PLIST   Thu Aug 27 08:22:33 2020
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2020/05/26 11:12:10 bouyer Exp $
+@comment $NetBSD: PLIST,v 1.2 2020/08/27 08:22:33 bouyer Exp $
 ${PYSITELIB}/grub/ExtLinuxConf.py
 ${PYSITELIB}/grub/ExtLinuxConf.pyc
 ${PYSITELIB}/grub/GrubConf.py
@@ -124,9 +124,6 @@ include/xen/physdev.h
 include/xen/platform.h
 include/xen/pmu.h
 include/xen/sched.h
-include/xen/sys/evtchn.h
-include/xen/sys/gntdev.h
-include/xen/sys/privcmd.h
 include/xen/sysctl.h
 include/xen/tmem.h
 include/xen/trace.h
@@ -308,6 +305,8 @@ libexec/xen/bin/xenctx
 libexec/xen/bin/xenpaging
 libexec/xen/bin/xenpvnetboot
 libexec/xen/boot/hvmloader
+libexec/xen/boot/ipxe.bin
+libexec/xen/boot/seabios.bin
 libexec/xen/boot/xen-shim
 man/man1/xenstore-chmod.1
 man/man1/xenstore-ls.1
Index: pkgsrc/sysutils/xentools413/distinfo
diff -u pkgsrc/sysutils/xentools413/distinfo:1.1 pkgsrc/sysutils/xentools413/distinfo:1.2
--- pkgsrc/sysutils/xentools413/distinfo:1.1    Tue May 26 11:12:10 2020
+++ pkgsrc/sysutils/xentools413/distinfo        Thu Aug 27 08:22:33 2020
@@ -1,11 +1,20 @@
-$NetBSD: distinfo,v 1.1 2020/05/26 11:12:10 bouyer Exp $
+$NetBSD: distinfo,v 1.2 2020/08/27 08:22:33 bouyer Exp $
 
+SHA1 (xen413/ipxe-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz) = b78d21457bc07b4c4d3e770109c169ddafdacdf5
+RMD160 (xen413/ipxe-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz) = 846dbcc0f56e87fca8c87b00ca2ed031471d4246
+SHA512 (xen413/ipxe-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz) = 0d96236385d241fdddafc88e8b4dac37298f2371b0c61055b78d6ce794166559127de2c110409c55738ca16c4a9e9e1834b03f7a2de85729d0a66cf5c313c9e8
+Size (xen413/ipxe-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz) = 3814909 bytes
+SHA1 (xen413/seabios-1.12.1.tar.gz) = 229f14b55876a20e1b60be075e99569a6bd8967d
+RMD160 (xen413/seabios-1.12.1.tar.gz) = d7e778971c68454b27730213b5d72c0600e77344
+SHA512 (xen413/seabios-1.12.1.tar.gz) = 58755ce842adcb99c0f2f3ebbf9ec6d4a5072753966ab46805a96db1570847b109a90e6e03d61f9088ef877ca8ba96a8006777dc38ec434fce6b487f6c1f91d0
+Size (xen413/seabios-1.12.1.tar.gz) = 613450 bytes
 SHA1 (xen413/xen-4.13.1.tar.gz) = 194a314171120dad0b3c5433104c92343ec884ba
 RMD160 (xen413/xen-4.13.1.tar.gz) = 29cfb90b9da0ede99c1228b8e5964a99547c205d
 SHA512 (xen413/xen-4.13.1.tar.gz) = b56d20704155d98d803496cba83eb928e0f986a750831cd5600fc88d0ae772fe1456571654375054043d2da8daca255cc98385ebf08b1b1a75ecf7f4b7a0ee90
 Size (xen413/xen-4.13.1.tar.gz) = 39024612 bytes
 SHA1 (patch-Config.mk) = c41005a60de2f94a72b0206030eb021c137653d3
 SHA1 (patch-Makefile) = 6c580cbea532d08a38cf5e54228bd0210a98da21
+SHA1 (patch-XSA335) = eb976f2742093ddf1858848da17abcb682c0e9bd
 SHA1 (patch-docs_man_xl-disk-configuration.5.pod) = 9261cc5035dba3414e32955da80707baab042476
 SHA1 (patch-docs_man_xl.1.pod.in) = ac3525478471a43fd30fa40c7e89d4b5cb164038
 SHA1 (patch-docs_man_xl.cfg.5.pod.in) = 5970961552f29c4536a884161a208a27a20dccf4
@@ -24,31 +33,35 @@ SHA1 (patch-tools_Makefile) = a0cba219b1
 SHA1 (patch-tools_Rules.mk) = c7b4ca2068182c2305522b0efc6f33a3b0ed513c
 SHA1 (patch-tools_configure) = aa0838a1eadf70f5ed99748926234c0376989ff5
 SHA1 (patch-tools_console_daemon_utils.c) = 1c954e1edadad2607f7b87eaf2d6285be7f968ff
-SHA1 (patch-tools_debugger_gdbsx_xg_xg_main.c) = 059551256e95858d7ade25e7637667862bd92499
+SHA1 (patch-tools_debugger_gdbsx_xg_xg_main.c) = 50e7a7e584a44771292a514cd96c1dcbff3e4b7d
 SHA1 (patch-tools_examples_Makefile) = fe258fc26e4507ca2fb4363c5e2197ee06e89d64
-SHA1 (patch-tools_firmware_etherboot_Makefile) = ca9f42207888de19e44b2129311e0bce1d4cfee1
+SHA1 (patch-tools_firmware_Makefile) = 592e292ee25facaefcd2627ca3591dab9a10e61c
+SHA1 (patch-tools_firmware_etherboot_Makefile) = 61741d59c72430d53682ea83deed91ee4ff3d220
 SHA1 (patch-tools_firmware_hvmloader_Makefile) = 02cac5e9314c4c71105f15a3c1c303c573d6583a
 SHA1 (patch-tools_hotplug_NetBSD_Makefile) = a880a38f82e97a5d7846345307d354c8055d23a9
 SHA1 (patch-tools_hotplug_NetBSD_block) = 535ecef7cc0431a14515387e47aadea5dec79569
 SHA1 (patch-tools_hotplug_NetBSD_vif-bridge) = 6d5288c9c47fe81b388ea73f9a71ca3975df36c2
 SHA1 (patch-tools_hotplug_NetBSD_vif-ip) = cb8fd1150f6ac24fa853444618437f7d984b4282
 SHA1 (patch-tools_hotplug_common_Makefile) = 590186dfb31713e8d9ee675186f826bcbcba3c15
-SHA1 (patch-tools_include_xen-sys_NetBSD_gntdev.h) = ce4f7160e92d23afa029c9548cead180fe980ff4
+SHA1 (patch-tools_include_Makefile) = 4d9cb71ff924259dfd3c1ff9f77060cb50805b45
 SHA1 (patch-tools_libs_call_netbsd.c) = c5e166212b0069220d9155636b41028f0f7f9e9e
-SHA1 (patch-tools_libs_call_private.h) = caeaf937ae379836c3187bee97ac0b986af53f9f
-SHA1 (patch-tools_libs_evtchn_netbsd.c) = 1abb0f128ab0702b606e22f199d297d1e9c0aae5
+SHA1 (patch-tools_libs_call_private.h) = fed1882d4b6cdfb13be4637fb219cabc3b432fc8
+SHA1 (patch-tools_libs_evtchn_netbsd.c) = dcb876d581b4b9f5ccabe2bbd3ed2b1704d1976b
 SHA1 (patch-tools_libs_foreignmemory_Makefile) = d225187d9a1c988b9a46ab464fc7e141097e56e3
 SHA1 (patch-tools_libs_foreignmemory_netbsd.c) = a8eaa785fc3d46cce943f6f205066ff175f7f0e6
 SHA1 (patch-tools_libs_foreignmemory_private.h) = 4dfd16cb0bc14882f9aba8ccbd543b09e7959499
 SHA1 (patch-tools_libs_gnttab_Makefile) = 613a1e1867c5110f0fcf85a3c766306c02a1f001
 SHA1 (patch-tools_libs_gnttab_netbsd.c) = fecbb0d41365fc49621964dbf8d3b3fcbfddb5d3
+SHA1 (patch-tools_libxc_xc_private.h) = b627c3f92a6e74e3708bbc110d0b6a4d6ea64c37
 SHA1 (patch-tools_libxl_libxl__create.c) = 09cd562f0839dda6f92d63d8fc8ed6de08dd82a8
 SHA1 (patch-tools_libxl_libxl_dm.c) = f1f1842dc75afbc6114f201b8a7ed09fea0e271b
 SHA1 (patch-tools_libxl_libxl_dom.c) = 0c4a96523d13de65aaa71ef705c3579ee8d641f3
 SHA1 (patch-tools_libxl_libxl_event.c) = 8147122d03102eccc45c48a7d6ca1aa5d6286040
 SHA1 (patch-tools_libxl_libxl_internal.h) = 31da26f2121fe2a1928d75f719554ed9389c187b
+SHA1 (patch-tools_libxl_libxl_netbsd.c) = e2289fabc37bbb0fa078ce9a7256229f998c5982
 SHA1 (patch-tools_libxl_libxl_uuid.c) = 1eb8c027dbeb7e67df7475ee6e4d87220140c65b
 SHA1 (patch-tools_ocaml_common.make) = 4b845bdf3a013852109749ee18dfe28e3440d951
+SHA1 (patch-tools_ocaml_libs_eventchn_xeneventchn_stubs.c) = 371e45af87b4432aedeaba1871aa94a4f492e011
 SHA1 (patch-tools_ocaml_xenstored_Makefile) = b267702cf4090c7b45bba530e60327fced24e3e5
 SHA1 (patch-tools_ocaml_xenstored_utils.ml) = fd951de732d6c31cae89bd4b58c5650108578d79
 SHA1 (patch-tools_qemu-xen-traditional_Makefile) = 5fbb55bf84f9856043be301d5d06530190fe9a60

Index: pkgsrc/sysutils/xentools413/Makefile
diff -u pkgsrc/sysutils/xentools413/Makefile:1.7 pkgsrc/sysutils/xentools413/Makefile:1.8
--- pkgsrc/sysutils/xentools413/Makefile:1.7    Sun Jul 26 08:49:38 2020
+++ pkgsrc/sysutils/xentools413/Makefile        Thu Aug 27 08:22:33 2020
@@ -1,16 +1,26 @@
-# $NetBSD: Makefile,v 1.7 2020/07/26 08:49:38 rillig Exp $
+# $NetBSD: Makefile,v 1.8 2020/08/27 08:22:33 bouyer Exp $
 #
 VERSION=       4.13.1
 
 DIST_SUBDIR=           xen413
 DISTNAME=              xen-${VERSION}
 PKGNAME=               xentools413-${VERSION}
-#PKGREVISION=          2
+PKGREVISION=           1
 CATEGORIES=            sysutils
 MASTER_SITES=          https://downloads.xenproject.org/release/xen/${VERSION}/
 
 DISTFILES=             ${DISTNAME}.tar.gz
 
+SEABIOS_VERSION=       1.12.1
+SEABIOS_DIST=          seabios-${SEABIOS_VERSION}.tar.gz
+DISTFILES+=            ${SEABIOS_DIST}
+SITES.${SEABIOS_DIST}= -http://xenbits.xen.org/gitweb/?p=seabios.git;a=snapshot;h=refs/tags/rel-${SEABIOS_VERSION};sf=tgz
+
+IPXE_VERSION=          1dd56dbd11082fb622c2ed21cfaced4f47d798a6        
+IPXE_DIST=             ipxe-${IPXE_VERSION}.tar.gz
+DISTFILES+=            ${IPXE_DIST}    
+SITES.${IPXE_DIST}=    -https://github.com/ipxe/ipxe/archive/${IPXE_VERSION}.tar.gz
+
 MAINTAINER=            bouyer%NetBSD.org@localhost
 HOMEPAGE=              https://xenproject.org/
 COMMENT=               Userland Tools for Xen 4.13.x
@@ -43,19 +53,21 @@ EGDIR=                      ${PREFIX}/share/examples/xen
 MESSAGE_SUBST+=                EGDIR=${EGDIR}
 
 USE_TOOLS+=            pod2man gmake pkg-config makeinfo perl bash cmake
-USE_LANGUAGES=         c
+USE_LANGUAGES=         c c++
 
 GNU_CONFIGURE=         YES
 #CONFIGURE_ARGS+=      --enable-xenapi
-CONFIGURE_ARGS+=       --disable-seabios
-CONFIGURE_ARGS+=       --disable-ipxe
+#CONFIGURE_ARGS+=      --disable-seabios
+#CONFIGURE_ARGS+=      --disable-ipxe
 
 CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFBASE}
 
 MAKE_ENV+=             PREFIX=${prefix:Q} WRKSRC=${WRKSRC}
 MAKE_ENV+=             APPEND_LIB=${LDFLAGS:Q}
 MAKE_ENV+=             XEN_EXAMPLES_DIR=${EGDIR}
-MAKE_ENV+=             MV=${MV:Q} PYTHON=${PYTHONBIN:Q} SED=${SED:Q}
+MAKE_ENV+=             MV=${MV:Q} CP=${CP:Q}
+MAKE_ENV+=             PYTHON=${PYTHONBIN:Q} PYTHON_COMMAND=${PYTHONBIN:Q}
+MAKE_ENV+=             SED=${SED:Q}  
 MAKE_ENV+=             V=YES
 MAKE_ENV+=             NO_WERROR=1
 
@@ -119,6 +131,8 @@ CONF_FILES_PERMS+=  ${EGDIR}/scripts/${s}
 
 pre-build:
        rm -f ${WRKSRC}/check/check_x11_devel
+       rm -f ${WRKSRC}/tools/include/xen-sys/NetBSD/evtchn.h
+       rm -f ${WRKSRC}/tools/include/xen-sys/NetBSD/privcmd.h
        ${CP} -f ${FILESDIR}/locking.sh  ${WRKSRC}/tools/hotplug/NetBSD/
        ${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
                ${WRKSRC}/docs/man/xenstore-chmod.1.pod |\

Index: pkgsrc/sysutils/xentools413/patches/patch-tools_debugger_gdbsx_xg_xg_main.c
diff -u pkgsrc/sysutils/xentools413/patches/patch-tools_debugger_gdbsx_xg_xg_main.c:1.1 pkgsrc/sysutils/xentools413/patches/patch-tools_debugger_gdbsx_xg_xg_main.c:1.2
--- pkgsrc/sysutils/xentools413/patches/patch-tools_debugger_gdbsx_xg_xg_main.c:1.1     Tue May 26 11:12:11 2020
+++ pkgsrc/sysutils/xentools413/patches/patch-tools_debugger_gdbsx_xg_xg_main.c Thu Aug 27 08:22:33 2020
@@ -1,8 +1,20 @@
-$NetBSD: patch-tools_debugger_gdbsx_xg_xg_main.c,v 1.1 2020/05/26 11:12:11 bouyer Exp $
+$NetBSD: patch-tools_debugger_gdbsx_xg_xg_main.c,v 1.2 2020/08/27 08:22:33 bouyer Exp $
 
---- tools/debugger/gdbsx/xg/xg_main.c.orig     2020-04-30 09:57:45.000000000 +0200
-+++ tools/debugger/gdbsx/xg/xg_main.c  2020-04-30 09:58:43.000000000 +0200
-@@ -126,12 +126,19 @@
+--- tools/debugger/gdbsx/xg/xg_main.c.orig     2020-05-14 14:19:32.000000000 +0200
++++ tools/debugger/gdbsx/xg/xg_main.c  2020-08-26 23:12:04.349806717 +0200
+@@ -49,7 +49,11 @@
+ #include "xg_public.h"
+ #include <xen/version.h>
+ #include <xen/domctl.h>
++#ifdef __NetBSD__
++#include <xen/xenio.h>
++#else
+ #include <xen/sys/privcmd.h>
++#endif
+ #include <xen/foreign/x86_32.h>
+ #include <xen/foreign/x86_64.h>
+ 
+@@ -126,12 +130,19 @@
      int flags, saved_errno;
  
      XGTRC("E\n");
Index: pkgsrc/sysutils/xentools413/patches/patch-tools_firmware_etherboot_Makefile
diff -u pkgsrc/sysutils/xentools413/patches/patch-tools_firmware_etherboot_Makefile:1.1 pkgsrc/sysutils/xentools413/patches/patch-tools_firmware_etherboot_Makefile:1.2
--- pkgsrc/sysutils/xentools413/patches/patch-tools_firmware_etherboot_Makefile:1.1     Tue May 26 11:12:11 2020
+++ pkgsrc/sysutils/xentools413/patches/patch-tools_firmware_etherboot_Makefile Thu Aug 27 08:22:33 2020
@@ -1,4 +1,4 @@
-$NetBSD: patch-tools_firmware_etherboot_Makefile,v 1.1 2020/05/26 11:12:11 bouyer Exp $
+$NetBSD: patch-tools_firmware_etherboot_Makefile,v 1.2 2020/08/27 08:22:33 bouyer Exp $
 
 --- tools/firmware/etherboot/Makefile.orig     2019-12-17 15:23:09.000000000 +0100
 +++ tools/firmware/etherboot/Makefile  2020-05-08 16:59:46.337172477 +0200
@@ -15,7 +15,7 @@ $NetBSD: patch-tools_firmware_etherboot_
 -      fi
 -      mv _$T $T
 +$D:
-+      ln -sf $(WRKSRC)/../ipxe $D
++      ln -sf $(WRKSRC)/../ipxe-${IPXE_GIT_TAG} $D
  
 -$D/src/arch/i386/Makefile: $T Config
 -      rm -rf $D
Index: pkgsrc/sysutils/xentools413/patches/patch-tools_libs_call_private.h
diff -u pkgsrc/sysutils/xentools413/patches/patch-tools_libs_call_private.h:1.1 pkgsrc/sysutils/xentools413/patches/patch-tools_libs_call_private.h:1.2
--- pkgsrc/sysutils/xentools413/patches/patch-tools_libs_call_private.h:1.1     Tue May 26 11:12:11 2020
+++ pkgsrc/sysutils/xentools413/patches/patch-tools_libs_call_private.h Thu Aug 27 08:22:33 2020
@@ -1,8 +1,17 @@
-$NetBSD: patch-tools_libs_call_private.h,v 1.1 2020/05/26 11:12:11 bouyer Exp $
+$NetBSD: patch-tools_libs_call_private.h,v 1.2 2020/08/27 08:22:33 bouyer Exp $
 
---- tools/libs/call/private.h.orig     2017-03-28 10:42:37.000000000 +0200
-+++ tools/libs/call/private.h  2017-03-28 10:43:04.000000000 +0200
-@@ -11,8 +11,10 @@
+--- tools/libs/call/private.h.orig     2020-05-14 14:19:32.000000000 +0200
++++ tools/libs/call/private.h  2020-05-27 14:11:18.819118697 +0200
+@@ -7,13 +7,19 @@
+ #include <xencall.h>
+ 
+ #include <xen/xen.h>
++#ifdef __NetBSD__
++#include <xen/xenio.h>
++#else
+ #include <xen/sys/privcmd.h>
++#endif
+ 
  #ifndef PAGE_SHIFT /* Mini-os, Yukk */
  #define PAGE_SHIFT           12
  #endif
Index: pkgsrc/sysutils/xentools413/patches/patch-tools_libs_evtchn_netbsd.c
diff -u pkgsrc/sysutils/xentools413/patches/patch-tools_libs_evtchn_netbsd.c:1.1 pkgsrc/sysutils/xentools413/patches/patch-tools_libs_evtchn_netbsd.c:1.2
--- pkgsrc/sysutils/xentools413/patches/patch-tools_libs_evtchn_netbsd.c:1.1    Tue May 26 11:12:11 2020
+++ pkgsrc/sysutils/xentools413/patches/patch-tools_libs_evtchn_netbsd.c        Thu Aug 27 08:22:33 2020
@@ -1,8 +1,21 @@
-$NetBSD: patch-tools_libs_evtchn_netbsd.c,v 1.1 2020/05/26 11:12:11 bouyer Exp $
+$NetBSD: patch-tools_libs_evtchn_netbsd.c,v 1.2 2020/08/27 08:22:33 bouyer Exp $
 
---- tools/libs/evtchn/netbsd.c.orig    2017-03-24 18:23:27.000000000 +0100
-+++ tools/libs/evtchn/netbsd.c 2017-03-24 18:23:40.000000000 +0100
-@@ -124,7 +124,7 @@
+--- tools/libs/evtchn/netbsd.c.orig    2020-05-14 14:19:32.000000000 +0200
++++ tools/libs/evtchn/netbsd.c 2020-05-27 14:07:41.348188034 +0200
+@@ -25,10 +25,10 @@
+ 
+ #include <sys/ioctl.h>
+ 
+-#include <xen/sys/evtchn.h>
+-
+ #include "private.h"
+ 
++#include <xen/xenio3.h>
++
+ #define EVTCHN_DEV_NAME  "/dev/xenevt"
+ 
+ int osdep_evtchn_open(xenevtchn_handle *xce)
+@@ -131,7 +131,7 @@
      int fd = xce->fd;
      evtchn_port_t port;
  
@@ -11,7 +24,7 @@ $NetBSD: patch-tools_libs_evtchn_netbsd.
          return -1;
  
      return port;
-@@ -133,7 +133,7 @@
+@@ -140,7 +140,7 @@
  int xenevtchn_unmask(xenevtchn_handle *xce, evtchn_port_t port)
  {
      int fd = xce->fd;

Added files:

Index: pkgsrc/sysutils/xentools413/patches/patch-XSA335
diff -u /dev/null pkgsrc/sysutils/xentools413/patches/patch-XSA335:1.1
--- /dev/null   Thu Aug 27 08:22:33 2020
+++ pkgsrc/sysutils/xentools413/patches/patch-XSA335    Thu Aug 27 08:22:33 2020
@@ -0,0 +1,86 @@
+$NetBSD: patch-XSA335,v 1.1 2020/08/27 08:22:33 bouyer Exp $
+
+From c5bd2924c6d6a5bcbffb8b5e7798a88970131c07 Mon Sep 17 00:00:00 2001
+From: Gerd Hoffmann <kraxel%redhat.com@localhost>
+Date: Mon, 17 Aug 2020 08:34:22 +0200
+Subject: [PATCH] usb: fix setup_len init (CVE-2020-14364)
+
+Store calculated setup_len in a local variable, verify it, and only
+write it to the struct (USBDevice->setup_len) in case it passed the
+sanity checks.
+
+This prevents other code (do_token_{in,out} functions specifically)
+from working with invalid USBDevice->setup_len values and overrunning
+the USBDevice->setup_buf[] buffer.
+
+Fixes: CVE-2020-14364
+Signed-off-by: Gerd Hoffmann <kraxel%redhat.com@localhost>
+---
+ hw/usb/core.c | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/hw/usb/core.c b/hw/usb/core.c
+index 5abd128b6bc5..5234dcc73fea 100644
+--- tools/qemu-xen/hw/usb/core.c.orig
++++ tools/qemu-xen/hw/usb/core.c
+@@ -129,6 +129,7 @@ void usb_wakeup(USBEndpoint *ep, unsigned int stream)
+ static void do_token_setup(USBDevice *s, USBPacket *p)
+ {
+     int request, value, index;
++    unsigned int setup_len;
+ 
+     if (p->iov.size != 8) {
+         p->status = USB_RET_STALL;
+@@ -138,14 +139,15 @@ static void do_token_setup(USBDevice *s, USBPacket *p)
+     usb_packet_copy(p, s->setup_buf, p->iov.size);
+     s->setup_index = 0;
+     p->actual_length = 0;
+-    s->setup_len   = (s->setup_buf[7] << 8) | s->setup_buf[6];
+-    if (s->setup_len > sizeof(s->data_buf)) {
++    setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6];
++    if (setup_len > sizeof(s->data_buf)) {
+         fprintf(stderr,
+                 "usb_generic_handle_packet: ctrl buffer too small (%d > %zu)\n",
+-                s->setup_len, sizeof(s->data_buf));
++                setup_len, sizeof(s->data_buf));
+         p->status = USB_RET_STALL;
+         return;
+     }
++    s->setup_len = setup_len;
+ 
+     request = (s->setup_buf[0] << 8) | s->setup_buf[1];
+     value   = (s->setup_buf[3] << 8) | s->setup_buf[2];
+@@ -259,26 +261,28 @@ static void do_token_out(USBDevice *s, USBPacket *p)
+ static void do_parameter(USBDevice *s, USBPacket *p)
+ {
+     int i, request, value, index;
++    unsigned int setup_len;
+ 
+     for (i = 0; i < 8; i++) {
+         s->setup_buf[i] = p->parameter >> (i*8);
+     }
+ 
+     s->setup_state = SETUP_STATE_PARAM;
+-    s->setup_len   = (s->setup_buf[7] << 8) | s->setup_buf[6];
+     s->setup_index = 0;
+ 
+     request = (s->setup_buf[0] << 8) | s->setup_buf[1];
+     value   = (s->setup_buf[3] << 8) | s->setup_buf[2];
+     index   = (s->setup_buf[5] << 8) | s->setup_buf[4];
+ 
+-    if (s->setup_len > sizeof(s->data_buf)) {
++    setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6];
++    if (setup_len > sizeof(s->data_buf)) {
+         fprintf(stderr,
+                 "usb_generic_handle_packet: ctrl buffer too small (%d > %zu)\n",
+-                s->setup_len, sizeof(s->data_buf));
++                setup_len, sizeof(s->data_buf));
+         p->status = USB_RET_STALL;
+         return;
+     }
++    s->setup_len = setup_len;
+ 
+     if (p->pid == USB_TOKEN_OUT) {
+         usb_packet_copy(p, s->data_buf, s->setup_len);
+-- 
+2.18.4
Index: pkgsrc/sysutils/xentools413/patches/patch-tools_firmware_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools413/patches/patch-tools_firmware_Makefile:1.1
--- /dev/null   Thu Aug 27 08:22:33 2020
+++ pkgsrc/sysutils/xentools413/patches/patch-tools_firmware_Makefile   Thu Aug 27 08:22:33 2020
@@ -0,0 +1,13 @@
+$NetBSD: patch-tools_firmware_Makefile,v 1.1 2020/08/27 08:22:33 bouyer Exp $
+
+--- tools/firmware/Makefile.orig       2020-05-14 14:19:32.000000000 +0200
++++ tools/firmware/Makefile    2020-08-26 19:39:04.950176746 +0200
+@@ -24,7 +24,7 @@
+       cp ovmf-makefile ovmf-dir/Makefile;
+ 
+ seabios-dir:
+-      GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_REVISION) seabios-dir
++      ln -sf ../../../seabios-rel-1.12.1 ${WRKSRC}/tools/firmware/seabios-dir
+       cp seabios-config seabios-dir/.config;
+       $(MAKE) -C seabios-dir olddefconfig CC=$(SEABIOSCC) LD=$(SEABIOSLD)
+       rm -f seabios-dir/.version
Index: pkgsrc/sysutils/xentools413/patches/patch-tools_include_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools413/patches/patch-tools_include_Makefile:1.1
--- /dev/null   Thu Aug 27 08:22:33 2020
+++ pkgsrc/sysutils/xentools413/patches/patch-tools_include_Makefile    Thu Aug 27 08:22:33 2020
@@ -0,0 +1,13 @@
+$NetBSD: patch-tools_include_Makefile,v 1.1 2020/08/27 08:22:33 bouyer Exp $
+
+--- tools/include/Makefile.orig        2020-08-27 00:04:16.538336097 +0200
++++ tools/include/Makefile     2020-08-27 00:05:22.129359415 +0200
+@@ -69,7 +69,7 @@
+       $(INSTALL_DATA) xen/foreign/*.h $(DESTDIR)$(includedir)/xen/foreign
+       $(INSTALL_DATA) xen/hvm/*.h $(DESTDIR)$(includedir)/xen/hvm
+       $(INSTALL_DATA) xen/io/*.h $(DESTDIR)$(includedir)/xen/io
+-      $(INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(includedir)/xen/sys
++      $(INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(includedir)/xen/sys || true
+       $(INSTALL_DATA) xen/xsm/*.h $(DESTDIR)$(includedir)/xen/xsm
+ 
+ .PHONY: uninstall
Index: pkgsrc/sysutils/xentools413/patches/patch-tools_libxc_xc_private.h
diff -u /dev/null pkgsrc/sysutils/xentools413/patches/patch-tools_libxc_xc_private.h:1.1
--- /dev/null   Thu Aug 27 08:22:33 2020
+++ pkgsrc/sysutils/xentools413/patches/patch-tools_libxc_xc_private.h  Thu Aug 27 08:22:33 2020
@@ -0,0 +1,16 @@
+$NetBSD: patch-tools_libxc_xc_private.h,v 1.1 2020/08/27 08:22:33 bouyer Exp $
+
+--- ./tools/libxc/xc_private.h.orig    2020-05-27 14:14:10.317819669 +0200
++++ ./tools/libxc/xc_private.h 2020-05-27 14:13:45.466112859 +0200
+@@ -38,7 +38,11 @@
+ #include <xenforeignmemory.h>
+ #include <xendevicemodel.h>
+ 
++#ifdef __NetBSD__
++#include <xen/xenio.h>
++#else
+ #include <xen/sys/privcmd.h>
++#endif
+ 
+ #include <xen-tools/libs.h>
+ 
Index: pkgsrc/sysutils/xentools413/patches/patch-tools_libxl_libxl_netbsd.c
diff -u /dev/null pkgsrc/sysutils/xentools413/patches/patch-tools_libxl_libxl_netbsd.c:1.1
--- /dev/null   Thu Aug 27 08:22:33 2020
+++ pkgsrc/sysutils/xentools413/patches/patch-tools_libxl_libxl_netbsd.c        Thu Aug 27 08:22:33 2020
@@ -0,0 +1,13 @@
+$NetBSD: patch-tools_libxl_libxl_netbsd.c,v 1.1 2020/08/27 08:22:33 bouyer Exp $
+
+--- tools/libxl/libxl_netbsd.c.orig    2020-08-26 21:55:50.587030608 +0200
++++ tools/libxl/libxl_netbsd.c 2020-08-26 21:56:05.491231282 +0200
+@@ -110,7 +110,7 @@
+ 
+ libxl_device_model_version libxl__default_device_model(libxl__gc *gc)
+ {
+-    return LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL;
++    return LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN;
+ }
+ 
+ int libxl__pci_numdevs(libxl__gc *gc)
Index: pkgsrc/sysutils/xentools413/patches/patch-tools_ocaml_libs_eventchn_xeneventchn_stubs.c
diff -u /dev/null pkgsrc/sysutils/xentools413/patches/patch-tools_ocaml_libs_eventchn_xeneventchn_stubs.c:1.1
--- /dev/null   Thu Aug 27 08:22:33 2020
+++ pkgsrc/sysutils/xentools413/patches/patch-tools_ocaml_libs_eventchn_xeneventchn_stubs.c     Thu Aug 27 08:22:33 2020
@@ -0,0 +1,12 @@
+$NetBSD: patch-tools_ocaml_libs_eventchn_xeneventchn_stubs.c,v 1.1 2020/08/27 08:22:33 bouyer Exp $
+
+--- ./tools/ocaml/libs/eventchn/xeneventchn_stubs.c.orig       2020-05-27 14:58:46.844387392 +0200
++++ ./tools/ocaml/libs/eventchn/xeneventchn_stubs.c    2020-05-27 14:58:15.278522159 +0200
+@@ -22,7 +22,6 @@
+ #include <stdint.h>
+ #include <sys/ioctl.h>
+ #include <xen/xen.h>
+-#include <xen/sys/evtchn.h>
+ #include <xenevtchn.h>
+ 
+ #define CAML_NAME_SPACE



Home | Main Index | Thread Index | Old Index