Page MenuHomeFreeBSD

est: prevent divide-by-zero in est_msr_info
ClosedPublic

Authored by guest-seuros on Wed, Jun 17, 12:44 AM.
Referenced Files
Unknown Object (File)
Mon, Jul 6, 12:14 AM
Unknown Object (File)
Fri, Jul 3, 8:33 AM
Unknown Object (File)
Fri, Jul 3, 5:44 AM
Unknown Object (File)
Thu, Jul 2, 7:57 PM
Unknown Object (File)
Thu, Jul 2, 6:41 PM
Unknown Object (File)
Sun, Jun 28, 1:13 PM
Unknown Object (File)
Fri, Jun 26, 1:10 AM
Unknown Object (File)
Fri, Jun 26, 1:09 AM
Subscribers

Details

Summary

When hw.est.msr_info=1 is set, est_msr_info() extracts the bus clock
from MSR_PERF_STATUS upper bits. On secondary CPUs, the MSR may
contain zero in the frequency ratio field, causing a
divide-by-zero panic.

Observed in pre Skylake Intel cpu.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

guest-seuros created this revision.

oh interesting, what did you observe this on?

get rid of the bootverbose change and putit in a different diff, and then i'll approve/land

sys/x86/cpufreq/est.c
1051

you should put this in a different diff. :-)

I can't find where this is documented - all of the SDMs I've looked at so far describe IA32_PERF_STATUS but do not cover the format of the register above bit 31.

This revision is now accepted and ready to land.Wed, Jun 17, 2:49 PM
This revision was automatically updated to reflect the committed changes.