pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/sysutils/xenkernel45
Module Name: pkgsrc
Committed By: bouyer
Date: Wed Dec 21 15:36:08 UTC 2016
Modified Files:
pkgsrc/sysutils/xenkernel45: Makefile distinfo
Added Files:
pkgsrc/sysutils/xenkernel45/patches: patch-XSA-202
Log Message:
Apply patch from upstream, fixing XSA-202
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 pkgsrc/sysutils/xenkernel45/Makefile
cvs rdiff -u -r1.20 -r1.21 pkgsrc/sysutils/xenkernel45/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/xenkernel45/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/xenkernel45/Makefile
diff -u pkgsrc/sysutils/xenkernel45/Makefile:1.25 pkgsrc/sysutils/xenkernel45/Makefile:1.26
--- pkgsrc/sysutils/xenkernel45/Makefile:1.25 Tue Dec 20 18:15:09 2016
+++ pkgsrc/sysutils/xenkernel45/Makefile Wed Dec 21 15:36:08 2016
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.25 2016/12/20 18:15:09 gdt Exp $
+# $NetBSD: Makefile,v 1.26 2016/12/21 15:36:08 bouyer Exp $
VERSION= 4.5.5
DISTNAME= xen-${VERSION}
PKGNAME= xenkernel45-${VERSION}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= sysutils
MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
Index: pkgsrc/sysutils/xenkernel45/distinfo
diff -u pkgsrc/sysutils/xenkernel45/distinfo:1.20 pkgsrc/sysutils/xenkernel45/distinfo:1.21
--- pkgsrc/sysutils/xenkernel45/distinfo:1.20 Tue Dec 20 10:22:28 2016
+++ pkgsrc/sysutils/xenkernel45/distinfo Wed Dec 21 15:36:08 2016
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.20 2016/12/20 10:22:28 bouyer Exp $
+$NetBSD: distinfo,v 1.21 2016/12/21 15:36:08 bouyer Exp $
SHA1 (xen-4.5.5.tar.gz) = 4073d411c72d3298baacfc15577b92b9ae577073
RMD160 (xen-4.5.5.tar.gz) = 34132ab04752dc594fbdc1404c95f402b7bbbe39
@@ -12,6 +12,7 @@ SHA1 (patch-XSA-195) = 0a44b7deda6a17c88
SHA1 (patch-XSA-196-1) = bdcd7673443fbf59aeff8ad019ffbe39758fcaee
SHA1 (patch-XSA-196-2) = 81b1d46f3ec8a3c5133f6a923fee0ab1b2b1c6a0
SHA1 (patch-XSA-200) = 37254653e3f9016de0440047465fddce7e9b1874
+SHA1 (patch-XSA-202) = 52cb1da3bb078f6b7574f606b8c9cacdf24f6518
SHA1 (patch-XSA-204) = 4d5616f418e3ea010af4cb9e5d1ad14c8adcbf1c
SHA1 (patch-xen_Makefile) = 750d0c8d4fea14d3ef3f872de5242a1f5104cbbe
SHA1 (patch-xen_arch_x86_Rules.mk) = 7b0894ba7311edb02118a021671f304cf3872154
Added files:
Index: pkgsrc/sysutils/xenkernel45/patches/patch-XSA-202
diff -u /dev/null pkgsrc/sysutils/xenkernel45/patches/patch-XSA-202:1.1
--- /dev/null Wed Dec 21 15:36:08 2016
+++ pkgsrc/sysutils/xenkernel45/patches/patch-XSA-202 Wed Dec 21 15:36:08 2016
@@ -0,0 +1,75 @@
+$NetBSD: patch-XSA-202,v 1.1 2016/12/21 15:36:08 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
++++ xen/arch/x86/x86_64/compat/entry.S
+@@ -174,6 +174,8 @@ compat_bad_hypercall:
+ /* %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
+ .Lcr4_orig:
+ .skip .Lcr4_alt_end - .Lcr4_alt, 0x90
+ .Lcr4_orig_end:
+@@ -209,6 +211,8 @@ ENTRY(compat_restore_all_guest)
+ (.Lcr4_orig_end - .Lcr4_orig), \
+ (.Lcr4_alt_end - .Lcr4_alt)
+ .popsection
++ or $X86_EFLAGS_IF,%r11
++ mov %r11d,UREGS_eflags(%rsp)
+ RESTORE_ALL adj=8 compat=1
+ .Lft0: iretq
+
+--- xen/arch/x86/x86_64/entry.S.orig
++++ xen/arch/x86/x86_64/entry.S
+@@ -40,28 +40,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
+
Home |
Main Index |
Thread Index |
Old Index