FreeBSD Bugzilla – Attachment 191851 Details for
Bug 192487
cpucontrol uses unsafe procedure to detect current microcode version
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for cpuctl to read Intel CPU revision correctly
patch-sys-dev-cpuctl-cpuctl.c (text/plain), 643 bytes, created by
Dan Lukes
on 2018-03-26 20:59:24 UTC
(
hide
)
Description:
Patch for cpuctl to read Intel CPU revision correctly
Filename:
MIME Type:
Creator:
Dan Lukes
Created:
2018-03-26 20:59:24 UTC
Size:
643 bytes
patch
obsolete
>--- sys/dev/cpuctl/cpuctl.c.orig 2018-03-17 00:49:59.000000000 +0100 >+++ sys/dev/cpuctl/cpuctl.c 2018-03-26 22:50:33.209937000 +0200 >@@ -362,6 +362,8 @@ > is_bound = cpu_sched_is_bound(td); > set_cpu(cpu, td); > critical_enter(); >+ wrmsr_safe(MSR_BIOS_SIGN, 0); >+ do_cpuid(1, tmp); > rdmsr_safe(MSR_BIOS_SIGN, &rev0); /* Get current microcode revision. */ > > /* >@@ -373,9 +375,9 @@ > /* > * Serialize instruction flow. > */ >- do_cpuid(0, tmp); >- critical_exit(); >+ do_cpuid(1, tmp); > rdmsr_safe(MSR_BIOS_SIGN, &rev1); /* Get new microcode revision. */ >+ critical_exit(); > restore_cpu(oldcpu, is_bound, td); > if (rev1 > rev0) > ret = 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 192487
:
191850
| 191851