pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/sysutils
Module Name: pkgsrc
Committed By: bouyer
Date: Wed Dec 21 15:35:44 UTC 2016
Modified Files:
pkgsrc/sysutils/xenkernel41: Makefile distinfo
pkgsrc/sysutils/xenkernel42: Makefile distinfo
Added Files:
pkgsrc/sysutils/xenkernel41/patches: patch-XSA-202
pkgsrc/sysutils/xenkernel42/patches: patch-XSA-202
Removed Files:
pkgsrc/sysutils/xenkernel41/patches: patch-xen_arch_x86_x86__64_entry.S
Log Message:
Apply patch backported from upstream, fixing XSA-202
Bump PKGREVISION
To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 pkgsrc/sysutils/xenkernel41/Makefile
cvs rdiff -u -r1.46 -r1.47 pkgsrc/sysutils/xenkernel41/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/xenkernel41/patches/patch-XSA-202
cvs rdiff -u -r1.1 -r0 \
pkgsrc/sysutils/xenkernel41/patches/patch-xen_arch_x86_x86__64_entry.S
cvs rdiff -u -r1.25 -r1.26 pkgsrc/sysutils/xenkernel42/Makefile
cvs rdiff -u -r1.24 -r1.25 pkgsrc/sysutils/xenkernel42/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/xenkernel42/patches/patch-XSA-202
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/sysutils/xenkernel41/Makefile
diff -u pkgsrc/sysutils/xenkernel41/Makefile:1.53 pkgsrc/sysutils/xenkernel41/Makefile:1.54
--- pkgsrc/sysutils/xenkernel41/Makefile:1.53 Tue Dec 20 10:22:28 2016
+++ pkgsrc/sysutils/xenkernel41/Makefile Wed Dec 21 15:35:44 2016
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.53 2016/12/20 10:22:28 bouyer Exp $
+# $NetBSD: Makefile,v 1.54 2016/12/21 15:35:44 bouyer Exp $
VERSION= 4.1.6.1
DISTNAME= xen-${VERSION}
PKGNAME= xenkernel41-${VERSION}
-PKGREVISION= 22
+PKGREVISION= 23
CATEGORIES= sysutils
MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
Index: pkgsrc/sysutils/xenkernel41/distinfo
diff -u pkgsrc/sysutils/xenkernel41/distinfo:1.46 pkgsrc/sysutils/xenkernel41/distinfo:1.47
--- pkgsrc/sysutils/xenkernel41/distinfo:1.46 Tue Dec 20 10:22:28 2016
+++ pkgsrc/sysutils/xenkernel41/distinfo Wed Dec 21 15:35:44 2016
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.46 2016/12/20 10:22:28 bouyer Exp $
+$NetBSD: distinfo,v 1.47 2016/12/21 15:35:44 bouyer Exp $
SHA1 (xen-4.1.6.1.tar.gz) = e5f15feb0821578817a65ede16110c6eac01abd0
RMD160 (xen-4.1.6.1.tar.gz) = bff11421fc44a26f2cc3156713267abcb36d7a19
@@ -45,12 +45,12 @@ SHA1 (patch-XSA-191) = 5da559e104543b8d2
SHA1 (patch-XSA-192) = b0f2801fe6db91c2a98b82897cdee057062c6c2b
SHA1 (patch-XSA-195) = a04295b397126e1cc1f129bb3cb9fb872fcbb373
SHA1 (patch-XSA-200) = 2e5f6e3596fa754030af29a1dc8fafb738ad1da4
+SHA1 (patch-XSA-202) = ceb6f02eb7f1a41243c6e47c4f1bbbc9626a8da5
SHA1 (patch-XSA-204) = 99e2b88b551d80724fcc27f925fbf65d3fc468de
SHA1 (patch-xen_Makefile) = d1c7e4860221f93d90818f45a77748882486f92b
SHA1 (patch-xen_arch_x86_Rules.mk) = 6b9b4bfa28924f7d3f6c793a389f1a7ac9d228e2
SHA1 (patch-xen_arch_x86_cpu_mcheck_vmce.c) = 5afd01780a13654f1d21bf1562f6431c8370be0b
SHA1 (patch-xen_arch_x86_time.c) = 2c69ac1cb5e0ca06c4f70acb91d2723a32ce98a9
-SHA1 (patch-xen_arch_x86_x86__64_entry.S) = 92bea7885c418e643bd9697abb9655bee9d1750b
SHA1 (patch-xen_drivers_char_console_c) = 0fe186369602ccffaeec6f4bfbee8bb4298d3ff0
SHA1 (patch-xen_drivers_passthrough_vtd_x86_ats.c) = 012ccbb27069c4f2e0361bd127397fdd22027f29
SHA1 (patch-xen_include_xen_stdarg.h) = e9df974a9b783ed442ab17497198432cb9844b70
Index: pkgsrc/sysutils/xenkernel42/Makefile
diff -u pkgsrc/sysutils/xenkernel42/Makefile:1.25 pkgsrc/sysutils/xenkernel42/Makefile:1.26
--- pkgsrc/sysutils/xenkernel42/Makefile:1.25 Tue Dec 20 10:22:28 2016
+++ pkgsrc/sysutils/xenkernel42/Makefile Wed Dec 21 15:35:44 2016
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.25 2016/12/20 10:22:28 bouyer Exp $
+# $NetBSD: Makefile,v 1.26 2016/12/21 15:35:44 bouyer Exp $
VERSION= 4.2.5
DISTNAME= xen-${VERSION}
PKGNAME= xenkernel42-${VERSION}
-PKGREVISION= 14
+PKGREVISION= 15
CATEGORIES= sysutils
MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
Index: pkgsrc/sysutils/xenkernel42/distinfo
diff -u pkgsrc/sysutils/xenkernel42/distinfo:1.24 pkgsrc/sysutils/xenkernel42/distinfo:1.25
--- pkgsrc/sysutils/xenkernel42/distinfo:1.24 Tue Dec 20 10:22:28 2016
+++ pkgsrc/sysutils/xenkernel42/distinfo Wed Dec 21 15:35:44 2016
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.24 2016/12/20 10:22:28 bouyer Exp $
+$NetBSD: distinfo,v 1.25 2016/12/21 15:35:44 bouyer Exp $
SHA1 (xen-4.2.5.tar.gz) = f42741e4ec174495ace70c4b17a6b9b0e60e798a
RMD160 (xen-4.2.5.tar.gz) = 7d4f7f1b32ee541d341a756b1f8da02816438d19
@@ -34,6 +34,7 @@ SHA1 (patch-XSA-191) = 7a5e2e78c457c5922
SHA1 (patch-XSA-192) = f95757227ece59a2f320308edefcf01f1a96212c
SHA1 (patch-XSA-195) = bb20234c4db0dc098ea47564732e87710bfcb9d8
SHA1 (patch-XSA-200) = 2f615fa9c4ac43fc98f6c897acb5ee7e4651a668
+SHA1 (patch-XSA-202) = 0effaf281f31d7dadbd9c02cb51b1d29dd0014f9
SHA1 (patch-XSA-204) = f6a59adf3cbd0aab59ccf233240a6b4e9ee2913b
SHA1 (patch-xen_Makefile) = e0d1b74518b9675ddc64295d1523ded9a8757c0a
SHA1 (patch-xen_arch_x86_Rules.mk) = 6b9b4bfa28924f7d3f6c793a389f1a7ac9d228e2
Added files:
Index: pkgsrc/sysutils/xenkernel41/patches/patch-XSA-202
diff -u /dev/null pkgsrc/sysutils/xenkernel41/patches/patch-XSA-202:1.1
--- /dev/null Wed Dec 21 15:35:45 2016
+++ pkgsrc/sysutils/xenkernel41/patches/patch-XSA-202 Wed Dec 21 15:35:44 2016
@@ -0,0 +1,73 @@
+$NetBSD: patch-XSA-202,v 1.1 2016/12/21 15:35:44 bouyer Exp $
+
+From: Jan Beulich <jbeulich%suse.com@localhost>
+Subject: x86: force EFLAGS.IF on when exiting to PV guests
+
+Guest kernels modifying instructions in the process of being emulated
+for another of their vCPU-s may effect EFLAGS.IF to be cleared upon
+next exiting to guest context, by converting the being emulated
+instruction to CLI (at the right point in time). Prevent any such bad
+effects by always forcing EFLAGS.IF on. And to cover hypothetical other
+similar issues, also force EFLAGS.{IOPL,NT,VM} to zero.
+
+This is XSA-202.
+
+Signed-off-by: Jan Beulich <jbeulich%suse.com@localhost>
+
+
+--- xen/arch/x86/x86_64/compat/entry.S.orig 2014-09-02 08:22:57.000000000 +0200
++++ xen/arch/x86/x86_64/compat/entry.S 2016-12-21 13:23:21.000000000 +0100
+@@ -173,6 +173,10 @@
+ /* %rbx: struct vcpu, interrupts disabled */
+ ENTRY(compat_restore_all_guest)
+ ASSERT_INTERRUPTS_DISABLED
++ mov $~(X86_EFLAGS_IOPL|X86_EFLAGS_NT|X86_EFLAGS_VM),%r11d
++ and UREGS_eflags(%rsp),%r11d
++ or $X86_EFLAGS_IF,%r11
++ mov %r11d,UREGS_eflags(%rsp)
+ RESTORE_ALL
+ addq $8,%rsp
+ .Lft0: iretq
+--- xen/arch/x86/x86_64/entry.S.orig 2016-12-21 13:25:26.000000000 +0100
++++ xen/arch/x86/x86_64/entry.S 2016-12-21 13:32:36.000000000 +0100
+@@ -41,30 +41,29 @@
+ testw $TRAP_syscall,4(%rsp)
+ jz iret_exit_to_guest
+
++ movq 24(%rsp),%r11 # RFLAGS
++ andq $~(X86_EFLAGS_IOPL|X86_EFLAGS_NT|X86_EFLAGS_VM),%r11
++ orq $X86_EFLAGS_IF,%r11
++
+ /* Don't use SYSRET path if the return address is not canonical. */
+ movq 8(%rsp),%rcx
+ sarq $47,%rcx
+ incl %ecx
+ cmpl $1,%ecx
+- ja .Lforce_iret
++ movq 8(%rsp),%rcx # RIP
++ ja iret_exit_to_guest
+
+- addq $8,%rsp
+- popq %rcx # RIP
+- popq %r11 # CS
+- cmpw $FLAT_USER_CS32,%r11
+- popq %r11 # RFLAGS
+- popq %rsp # RSP
++ cmpw $FLAT_USER_CS32,%r11w
++ movq 32(%rsp),%rsp # RSP
+ je 1f
+ sysretq
+ 1: sysretl
+
+-.Lforce_iret:
+- /* Mimic SYSRET behavior. */
+- movq 8(%rsp),%rcx # RIP
+- movq 24(%rsp),%r11 # RFLAGS
+ ALIGN
+ /* No special register assumptions. */
+ iret_exit_to_guest:
++ andl $~(X86_EFLAGS_IOPL|X86_EFLAGS_NT|X86_EFLAGS_VM),24(%rsp)
++ orl $X86_EFLAGS_IF,24(%rsp)
+ addq $8,%rsp
+ .Lft0: iretq
+
Index: pkgsrc/sysutils/xenkernel42/patches/patch-XSA-202
diff -u /dev/null pkgsrc/sysutils/xenkernel42/patches/patch-XSA-202:1.1
--- /dev/null Wed Dec 21 15:35:45 2016
+++ pkgsrc/sysutils/xenkernel42/patches/patch-XSA-202 Wed Dec 21 15:35:44 2016
@@ -0,0 +1,69 @@
+$NetBSD: patch-XSA-202,v 1.1 2016/12/21 15:35:44 bouyer Exp $
+
+From: Jan Beulich <jbeulich%suse.com@localhost>
+Subject: x86: force EFLAGS.IF on when exiting to PV guests
+
+Guest kernels modifying instructions in the process of being emulated
+for another of their vCPU-s may effect EFLAGS.IF to be cleared upon
+next exiting to guest context, by converting the being emulated
+instruction to CLI (at the right point in time). Prevent any such bad
+effects by always forcing EFLAGS.IF on. And to cover hypothetical other
+similar issues, also force EFLAGS.{IOPL,NT,VM} to zero.
+
+This is XSA-202.
+
+Signed-off-by: Jan Beulich <jbeulich%suse.com@localhost>
+
+
+--- xen/arch/x86/x86_64/entry.S.orig
++++ xen/arch/x86/x86_64/entry.S
+@@ -41,28 +41,29 @@ restore_all_guest:
+ testw $TRAP_syscall,4(%rsp)
+ jz iret_exit_to_guest
+
++ movq 24(%rsp),%r11 # RFLAGS
++ andq $~(X86_EFLAGS_IOPL|X86_EFLAGS_NT|X86_EFLAGS_VM),%r11
++ orq $X86_EFLAGS_IF,%r11
++
+ /* Don't use SYSRET path if the return address is not canonical. */
+ movq 8(%rsp),%rcx
+ sarq $47,%rcx
+ incl %ecx
+ cmpl $1,%ecx
+- ja .Lforce_iret
++ movq 8(%rsp),%rcx # RIP
++ ja iret_exit_to_guest
+
+ cmpw $FLAT_USER_CS32,16(%rsp)# CS
+- movq 8(%rsp),%rcx # RIP
+- movq 24(%rsp),%r11 # RFLAGS
+ movq 32(%rsp),%rsp # RSP
+ je 1f
+ sysretq
+ 1: sysretl
+
+-.Lforce_iret:
+- /* Mimic SYSRET behavior. */
+- movq 8(%rsp),%rcx # RIP
+- movq 24(%rsp),%r11 # RFLAGS
+ ALIGN
+ /* No special register assumptions. */
+ iret_exit_to_guest:
++ andl $~(X86_EFLAGS_IOPL|X86_EFLAGS_NT|X86_EFLAGS_VM),24(%rsp)
++ orl $X86_EFLAGS_IF,24(%rsp)
+ addq $8,%rsp
+ .Lft0: iretq
+
+--- xen/arch/x86/x86_64/compat/entry.S.orig 2014-09-02 08:22:57.000000000 +0200
++++ xen/arch/x86/x86_64/compat/entry.S 2016-12-21 13:23:21.000000000 +0100
+@@ -173,6 +173,10 @@
+ /* %rbx: struct vcpu, interrupts disabled */
+ ENTRY(compat_restore_all_guest)
+ ASSERT_INTERRUPTS_DISABLED
++ mov $~(X86_EFLAGS_IOPL|X86_EFLAGS_NT|X86_EFLAGS_VM),%r11d
++ and UREGS_eflags(%rsp),%r11d
++ or $X86_EFLAGS_IF,%r11
++ mov %r11d,UREGS_eflags(%rsp)
+ RESTORE_ALL
+ addq $8,%rsp
+ .Lft0: iretq
Home |
Main Index |
Thread Index |
Old Index