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)
Fri, Jun 26, 1:10 AM
Unknown Object (File)
Fri, Jun 26, 1:09 AM
Unknown Object (File)
Thu, Jun 25, 12:34 PM
Unknown Object (File)
Thu, Jun 25, 12:59 AM
Unknown Object (File)
Wed, Jun 24, 7:04 AM
Unknown Object (File)
Tue, Jun 23, 11:43 AM
Unknown Object (File)
Sun, Jun 21, 1:37 PM
Unknown Object (File)
Sun, Jun 21, 7:49 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 Passed
Unit
No Test Coverage
Build Status
Buildable 73923
Build 70806: arc lint + arc unit

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.