Import of pkgsrc-2015Q1

This commit is contained in:
2015-04-22 14:34:26 +02:00
committed by Lionel Sambuc
parent 9a8c06dafb
commit 4af1cdf7a9
25114 changed files with 870550 additions and 795435 deletions

View File

@@ -0,0 +1,12 @@
Xen is a virtual machine monitor which supports running multiple
guests operating systems on a single machine. Guest OSes (also
called "domains") require a modified kernel which supports Xen
hypercalls in replacement to access to the physical hardware. At
boot, the xen kernel is loaded along with the guest kernel for the
first domain (called domain0). domain0 has privileges to access
the physical hardware (PCI and ISA devices), administrate other
domains and provide virtual devices (disks and network) to other
domains.
This package contains the 4.5 Xen4 kernel itself. PCI passthrough is
not supported. PAE is mandatory; on i386 one must use XEN3PAE_DOM[0U].

View File

@@ -0,0 +1,7 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1 2015/01/20 16:42:13 bouyer Exp $
The Xen hypervisor is installed under the following locations:
${XENKERNELDIR}/xen.gz (standard hypervisor)
${XENKERNELDIR}/xen-debug.gz (debug hypervisor)
===========================================================================

View File

@@ -0,0 +1,56 @@
# $NetBSD: Makefile,v 1.5 2015/03/10 20:08:43 spz Exp $
VERSION= 4.5.0
DISTNAME= xen-${VERSION}
PKGNAME= xenkernel45-${VERSION}
PKGREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://xenproject.org/
COMMENT= Xen 4.5.x Kernel
LICENSE= gnu-gpl-v2
ONLY_FOR_PLATFORM= Linux-2.6*-i386 Linux-2.6*-x86_64
ONLY_FOR_PLATFORM+= NetBSD-[5-9].*-x86_64 NetBSD-[5-9].*-i386
NO_CONFIGURE= yes
USE_TOOLS+= gmake
PYTHON_FOR_BUILD_ONLY= YES
PYTHON_VERSIONS_INCOMPATIBLE= 33 34
MAKE_ENV+= OCAML_TOOLS=no
INSTALLATION_DIRS= xen45-kernel
XENKERNELDIR= ${PREFIX}/${INSTALLATION_DIRS}
MESSAGE_SUBST+= XENKERNELDIR=${XENKERNELDIR}
.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Mclang)
EXTRA_CFLAGS+= -Qunused-arguments -no-integrated-as -Wno-error=format \
-Wno-error=parentheses-equality -Wno-error=enum-conversion \
-Wno-error=unused-function -Wno-error=unused-const-variable \
-Wno-error=ignored-attributes -Wno-error=initializer-overrides
.endif
MAKE_ENV+= EXTRA_CFLAGS=${EXTRA_CFLAGS:Q}
do-build:
cd ${WRKSRC}/xen && ${BUILD_MAKE_CMD} debug=n build
${CP} ${WRKSRC}/xen/xen.gz ${WRKDIR}/xen.gz
cd ${WRKSRC}/xen && ${MAKE_PROGRAM} clean
cd ${WRKSRC}/xen && ${BUILD_MAKE_CMD} debug=y build
${CP} ${WRKSRC}/xen/xen.gz ${WRKDIR}/xen-debug.gz
do-install:
${INSTALL_DATA} ${WRKDIR}/xen.gz \
${DESTDIR}${XENKERNELDIR}/xen.gz
${INSTALL_DATA} ${WRKDIR}/xen-debug.gz \
${DESTDIR}${XENKERNELDIR}/xen-debug.gz
.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.1 2015/01/20 16:42:13 bouyer Exp $
xen45-kernel/xen-debug.gz
xen45-kernel/xen.gz

View File

@@ -0,0 +1,13 @@
$NetBSD: distinfo,v 1.4 2015/03/10 20:08:43 spz Exp $
SHA1 (xen-4.5.0.tar.gz) = c4aab5fb366496ad1edc7fe0a935a0d604335637
RMD160 (xen-4.5.0.tar.gz) = e35ba0cb484492c1a289218eb9bf53b57dbd3a45
Size (xen-4.5.0.tar.gz) = 18404933 bytes
SHA1 (patch-CVE-2015-2044) = 354fe44df0c3b464137f50e2b9de3930f3910c0d
SHA1 (patch-CVE-2015-2045) = 98e3f8064b7c190b2ae69c7d4c8f71febf8fbf52
SHA1 (patch-CVE-2015-2151) = 30344d233eade872fa7062493d754f8bccaf9d2a
SHA1 (patch-Config.mk) = a2a104d023cea4e551a3ad40927d4884d6c610bf
SHA1 (patch-xen_Makefile) = 750d0c8d4fea14d3ef3f872de5242a1f5104cbbe
SHA1 (patch-xen_arch_x86_Rules.mk) = 7b0894ba7311edb02118a021671f304cf3872154
SHA1 (patch-xen_include_asm-x86_current.h) = 8a21577be06383c0c7f53c15ba828f77fb6314ad
SHA1 (patch-xen_include_xen_lib.h) = b9f5dff5b4cf11333d95d9835941c6bc19b776ad

View File

@@ -0,0 +1,53 @@
$NetBSD: patch-CVE-2015-2044,v 1.1 2015/03/05 14:21:31 spz Exp $
x86/HVM: return all ones on wrong-sized reads of system device I/O ports
So far the value presented to the guest remained uninitialized.
This is CVE-2015-2044 / XSA-121.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
--- xen/arch/x86/hvm/rtc.c.orig 2014-09-02 06:22:57.000000000 +0000
+++ xen/arch/x86/hvm/rtc.c
@@ -703,7 +703,8 @@ static int handle_rtc_io(
if ( bytes != 1 )
{
- gdprintk(XENLOG_WARNING, "HVM_RTC bas access\n");
+ gdprintk(XENLOG_WARNING, "HVM_RTC bad access\n");
+ *val = ~0;
return X86EMUL_OKAY;
}
--- xen/arch/x86/hvm/i8254.c.orig 2014-09-02 06:22:57.000000000 +0000
+++ xen/arch/x86/hvm/i8254.c
@@ -486,6 +486,7 @@ static int handle_pit_io(
if ( bytes != 1 )
{
gdprintk(XENLOG_WARNING, "PIT bad access\n");
+ *val = ~0;
return X86EMUL_OKAY;
}
--- xen/arch/x86/hvm/pmtimer.c.orig 2014-09-02 06:22:57.000000000 +0000
+++ xen/arch/x86/hvm/pmtimer.c
@@ -213,6 +213,7 @@ static int handle_pmt_io(
if ( bytes != 4 )
{
gdprintk(XENLOG_WARNING, "HVM_PMT bad access\n");
+ *val = ~0;
return X86EMUL_OKAY;
}
--- xen/arch/x86/hvm/vpic.c.orig 2014-09-02 06:22:57.000000000 +0000
+++ xen/arch/x86/hvm/vpic.c
@@ -331,6 +331,7 @@ static int vpic_intercept_pic_io(
if ( bytes != 1 )
{
gdprintk(XENLOG_WARNING, "PIC_IO bad access size %d\n", bytes);
+ *val = ~0;
return X86EMUL_OKAY;
}

View File

@@ -0,0 +1,42 @@
$NetBSD: patch-CVE-2015-2045,v 1.1 2015/03/05 14:21:31 spz Exp $
pre-fill structures for certain HYPERVISOR_xen_version sub-ops
... avoiding to pass hypervisor stack contents back to the caller
through space unused by the respective strings.
This is CVE-2015-2045 / XSA-122.
Signed-off-by: Aaron Adams <Aaron.Adams@nccgroup.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
--- xen/common/kernel.c.orig 2014-09-02 06:22:57.000000000 +0000
+++ xen/common/kernel.c
@@ -240,6 +240,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDL
case XENVER_extraversion:
{
xen_extraversion_t extraversion;
+
+ memset(extraversion, 0, sizeof(extraversion));
safe_strcpy(extraversion, xen_extra_version());
if ( copy_to_guest(arg, extraversion, ARRAY_SIZE(extraversion)) )
return -EFAULT;
@@ -249,6 +251,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDL
case XENVER_compile_info:
{
struct xen_compile_info info;
+
+ memset(&info, 0, sizeof(info));
safe_strcpy(info.compiler, xen_compiler());
safe_strcpy(info.compile_by, xen_compile_by());
safe_strcpy(info.compile_domain, xen_compile_domain());
@@ -284,6 +288,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDL
case XENVER_changeset:
{
xen_changeset_info_t chgset;
+
+ memset(chgset, 0, sizeof(chgset));
safe_strcpy(chgset, xen_changeset());
if ( copy_to_guest(arg, chgset, ARRAY_SIZE(chgset)) )
return -EFAULT;

View File

@@ -0,0 +1,20 @@
$NetBSD: patch-CVE-2015-2151,v 1.1 2015/03/10 20:08:44 spz Exp $
xsa123.patch from upstream:
For ModRM encoded instructions with register operands we must not
overwrite ea.mem.seg (if a - bogus in that case - segment override was
present) as it aliases with ea.reg.
This is CVE-2015-2151 / XSA-123.
--- xen/arch/x86/x86_emulate/x86_emulate.c.orig 2015-01-12 16:53:24.000000000 +0000
+++ xen/arch/x86/x86_emulate/x86_emulate.c
@@ -1756,7 +1756,7 @@ x86_emulate(
}
}
- if ( override_seg != -1 )
+ if ( override_seg != -1 && ea.type == OP_MEM )
ea.mem.seg = override_seg;
/* Early operand adjustments. */

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-Config.mk,v 1.1 2015/01/20 16:42:13 bouyer Exp $
--- Config.mk.orig 2015-01-12 17:53:24.000000000 +0100
+++ Config.mk 2015-01-19 12:29:14.000000000 +0100
@@ -39,6 +39,8 @@
HOSTCC = gcc
HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
HOSTCFLAGS += -fno-strict-aliasing
+HOSTCFLAGS += ${EXTRA_CFLAGS}
+CFLAGS += ${EXTRA_CFLAGS}
DISTDIR ?= $(XEN_ROOT)/dist
DESTDIR ?= /

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-xen_Makefile,v 1.1 2015/01/20 16:42:13 bouyer Exp $
--- xen/Makefile.orig 2015-01-12 17:53:24.000000000 +0100
+++ xen/Makefile 2015-01-19 12:29:14.000000000 +0100
@@ -131,7 +131,7 @@
-e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
-e 's/@@domain@@/$(XEN_DOMAIN)/g' \
-e 's/@@hostname@@/$(shell hostname)/g' \
- -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head -1)!g' \
+ -e 's!@@compiler@@!$(shell $(CC) $(EXTRA_CFLAGS) $(CFLAGS) --version 2>&1 | head -1)!g' \
-e 's/@@version@@/$(XEN_VERSION)/g' \
-e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
-e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \

View File

@@ -0,0 +1,12 @@
$NetBSD: patch-xen_arch_x86_Rules.mk,v 1.1 2015/01/20 16:42:13 bouyer Exp $
--- xen/arch/x86/Rules.mk.orig 2015-01-12 17:53:24.000000000 +0100
+++ xen/arch/x86/Rules.mk 2015-01-19 12:29:14.000000000 +0100
@@ -24,6 +24,7 @@
CFLAGS += -I$(BASEDIR)/include
CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default
+CFLAGS += $(EXTRA_CFLAGS)
# Prevent floating-point variables from creeping into Xen.
CFLAGS += -msoft-float

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-xen_include_asm-x86_current.h,v 1.1 2015/02/04 20:52:16 joerg Exp $
--- xen/include/asm-x86/current.h.orig 2015-01-30 12:45:05.000000000 +0000
+++ xen/include/asm-x86/current.h
@@ -25,7 +25,7 @@ struct cpu_info {
static inline struct cpu_info *get_cpu_info(void)
{
- register unsigned long sp asm("rsp");
+ unsigned long sp = (unsigned long)__builtin_frame_address(0);
return (struct cpu_info *)((sp & ~(STACK_SIZE-1)) + STACK_SIZE) - 1;
}

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-xen_include_xen_lib.h,v 1.1 2015/01/20 16:42:13 bouyer Exp $
--- xen/include/xen/lib.h.orig 2015-01-12 17:53:24.000000000 +0100
+++ xen/include/xen/lib.h 2015-01-19 12:30:35.000000000 +0100
@@ -43,7 +43,7 @@
do { if ( unlikely(!(p)) ) assert_failed(#p); } while (0)
#define debug_build() 1
#else
-#define ASSERT(p) do { if ( 0 && (p) ); } while (0)
+#define ASSERT(p) do { if ( 0 && (p) ) (void)0; } while (0)
#define debug_build() 0
#endif