Page MenuHomeFreeBSD

est: prevent divide-by-zero in est_msr_info
ClosedPublic

Authored by guest-seuros on Jun 17 2026, 12:44 AM.
Referenced Files
Unknown Object (File)
Thu, Aug 13, 1:24 AM
Unknown Object (File)
Wed, Aug 12, 11:29 PM
Unknown Object (File)
Wed, Aug 12, 6:56 PM
Unknown Object (File)
Mon, Aug 10, 12:50 PM
Unknown Object (File)
Mon, Aug 10, 11:01 AM
Unknown Object (File)
Mon, Aug 10, 8:24 AM
Unknown Object (File)
Sat, Aug 8, 5:22 AM
Unknown Object (File)
Fri, Aug 7, 8:02 PM
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.Jun 17 2026, 2:49 PM
This revision was automatically updated to reflect the committed changes.