NetBSD-Bugs archive

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

Re: port-amd64/52596 (Another netbsd-8 panic)



The following reply was made to PR port-amd64/52596; it has been noted by GNATS.

From: coypu%sdf.org@localhost
To: Dominik Bialy <dmb%yenn.ulegend.net@localhost>
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: port-amd64/52596 (Another netbsd-8 panic)
Date: Thu, 12 Oct 2017 00:18:29 +0000

 Complete shot in the dark, this is an errata workaround for similar
 AMD machines:
 
 The SWAPGS instruction fails to cause an input dependency on the GS
 segment register. If the GS segment register has been recently
 changed via a MOV or POP segment register instruction, SWAPGS may
 incorrectly save the old value of GS base into the KernelGSbase MSR.
 
 Index: arch/amd64/amd64/locore.S
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/amd64/amd64/locore.S,v
 retrieving revision 1.131
 diff -u -r1.131 locore.S
 --- arch/amd64/amd64/locore.S	30 Sep 2017 11:43:57 -0000	1.131
 +++ arch/amd64/amd64/locore.S	12 Oct 2017 00:12:08 -0000
 @@ -1165,6 +1165,7 @@
  	CLI(cx)
  	SWAPGS
  	movw	%ax,%gs
 +	mfence
  	SWAPGS
  	STI(cx)
  
 @@ -1199,6 +1200,7 @@
  	CLI(ax)
  	SWAPGS
  	movw	TF_GS(%rbx),%gs
 +	mfence
  	SWAPGS
  	STI(ax)
  #else
 


Home | Main Index | Thread Index | Old Index