diff options
author | 2018-12-18 21:11:09 +0000 | |
---|---|---|
committer | 2018-12-18 21:11:09 +0000 | |
commit | 9d030fd915b72c0afe5ed2999df58222c243560c (patch) | |
tree | 67a7fa854055b0488f1d7f0eb94ceccbea3f0916 | |
parent | "a" MIDI, not "an"; (diff) | |
download | wireguard-openbsd-9d030fd915b72c0afe5ed2999df58222c243560c.tar.xz wireguard-openbsd-9d030fd915b72c0afe5ed2999df58222c243560c.zip |
Detection of MELTDOWN-proof Intel CPUs was broken: cpuid.07 has
subleafs, so to get SEFF0EDX_ARCH_CAP we have to clear %ecx too.
While here, delete a redundant cpuid.01 invocation.
problem noted and testing by tedu@
ok mlarkin@ deraadt@
-rw-r--r-- | sys/arch/amd64/amd64/locore0.S | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/locore0.S b/sys/arch/amd64/amd64/locore0.S index 67f6f75ea99..424488bdb33 100644 --- a/sys/arch/amd64/amd64/locore0.S +++ b/sys/arch/amd64/amd64/locore0.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore0.S,v 1.9 2018/07/10 16:01:26 deraadt Exp $ */ +/* $OpenBSD: locore0.S,v 1.10 2018/12/18 21:11:09 guenther Exp $ */ /* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */ /* @@ -223,12 +223,11 @@ bi_size_ok: * Intel CPU, now check if IA32_ARCH_CAPABILITIES is supported and * if it says this CPU is safe. */ - movl $0x0, %eax - cpuid cmpl $0x7, %eax jl .Lcpu_check_finished movl $0x7, %eax + xorl %ecx,%ecx cpuid testl $SEFF0EDX_ARCH_CAP, %edx jz .Lcpu_check_finished |