Source-Changes-HG archive

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

[src/bouyer-xenpvh]: src/sys/arch/amd64/amd64 restore %eax before using it. T...



details:   https://anonhg.NetBSD.org/src/rev/5c5a777c2d4a
branches:  bouyer-xenpvh
changeset: 930603:5c5a777c2d4a
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Apr 09 16:51:00 2020 +0000

description:
restore %eax before using it. This bug caused event handlers to be called
spuriously at high spl or in a reentrant manner.
Now a amd64 PVHVM domU can checkout pkgsrc and build packages without panic.

diffstat:

 sys/arch/amd64/amd64/spl.S |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 8bded5666551 -r 5c5a777c2d4a sys/arch/amd64/amd64/spl.S
--- a/sys/arch/amd64/amd64/spl.S        Thu Apr 09 16:12:50 2020 +0000
+++ b/sys/arch/amd64/amd64/spl.S        Thu Apr 09 16:51:00 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spl.S,v 1.43 2020/01/08 17:38:41 ad Exp $      */
+/*     $NetBSD: spl.S,v 1.43.4.1 2020/04/09 16:51:00 bouyer Exp $      */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -366,8 +366,9 @@
        popq    %rbx                    /* get previous priority */
        decl    CPUVAR(IDEPTH)
        leaq    1f(%rip),%r13
-1:     movl    %ebx,%eax
+1:
 #if !defined(XENPV)
+       movl    %ebx,%eax
        movl    CPUVAR(IUNMASK)(,%rax,4),%eax
        CLI(si)
        andl    CPUVAR(IPENDING),%eax
@@ -379,6 +380,7 @@
 #endif
 2:
 #if defined(XEN)
+       movl    %ebx,%eax
        movl    CPUVAR(XUNMASK)(,%rax,4),%eax
        CLI(si)
        andl    CPUVAR(XPENDING),%eax



Home | Main Index | Thread Index | Old Index