summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniklas <niklas@openbsd.org>2004-06-21 22:35:47 +0000
committerniklas <niklas@openbsd.org>2004-06-21 22:35:47 +0000
commitdf04b6584fd9f2c3ed9d3298fea5f6e49a9b4d1f (patch)
tree8ffc0d795cae6f186136e2f4e607f268f247f1dd
parentprefix ls option flags with LS_ (diff)
downloadwireguard-openbsd-df04b6584fd9f2c3ed9d3298fea5f6e49a9b4d1f.tar.xz
wireguard-openbsd-df04b6584fd9f2c3ed9d3298fea5f6e49a9b4d1f.zip
Pure luck has protected us from this bug until now: locore.S
%r9 are not saved over function calls and more we did not even want &proc0 as the old process in switch_search, but zero. Fixes bsd.rd.
-rw-r--r--sys/arch/amd64/amd64/locore.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/locore.S b/sys/arch/amd64/amd64/locore.S
index 732eea0a0df..665161f05c6 100644
--- a/sys/arch/amd64/amd64/locore.S
+++ b/sys/arch/amd64/amd64/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.11 2004/06/13 21:49:12 niklas Exp $ */
+/* $OpenBSD: locore.S,v 1.12 2004/06/21 22:35:47 niklas Exp $ */
/* $NetBSD: locore.S,v 1.2 2003/04/26 19:34:45 fvdl Exp $ */
/*
@@ -1036,8 +1036,8 @@ ENTRY(switch_exit)
call *%rsi
/* Jump into cpu_switch() with the right state. */
- movq %r9, %r13
- movq $0, CPUVAR(CURPROC)
+ xorq %r13, %r13
+ movq %r13, CPUVAR(CURPROC)
jmp switch_search
/*