Page MenuHomeFreeBSD

x86: support sending non-fatal MCA messages to syslog
ClosedPublic

Authored by jtl on Sep 8 2017, 3:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jul 26 2025, 3:59 AM
Unknown Object (File)
Jul 25 2025, 8:21 PM
Unknown Object (File)
Jun 17 2025, 11:06 AM
Unknown Object (File)
Apr 20 2025, 1:53 PM
Unknown Object (File)
Apr 20 2025, 1:50 PM
Unknown Object (File)
Apr 20 2025, 1:27 PM
Unknown Object (File)
Apr 20 2025, 1:23 PM
Unknown Object (File)
Apr 20 2025, 1:07 PM
Subscribers

Details

Summary

Currently, all machine-check errors are logged to the console. However, this can have performance implications which can turn a storm of correctable errors into disruptive events.

Provide an option to direct non-fatal messages to syslog. Note that we will always log to the console for fatal errors and errors directly printed from a hardware interrupt context.

Test Plan

Use the mechanism in D52942 to create artificial events for testing.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

jhb added inline comments.
FreeBSD/sys/x86/x86/mca.c
305 ↗(On Diff #32807)

I'm a bit leery of putting 1k on the stack. I have some old patches to use dedicated stacks for MC# (similar to what we do for NMI) which we might consider at some point and which would perhaps alleviate that worry.

This revision is now accepted and ready to land.Sep 8 2017, 6:23 PM
jtl retitled this revision from Provide an option to send non-fatal machine-check errors to syslog (instead of the console) to x86: support sending non-fatal MCA messages to syslog.
jtl edited the summary of this revision. (Show Details)
jtl edited the test plan for this revision. (Show Details)
jtl added reviewers: markj, glebius, lprylli_netflix.com.
jtl changed the repository for this revision from rS FreeBSD src repository - subversion to rG FreeBSD src repository.

Updating to apply cleanly on top of D52946, which introduces the use of sbuf to gather the log message.

This revision now requires review to proceed.Tue, Oct 7, 2:38 PM
sys/x86/x86/mca.c
767

IMO it's nicer to avoid breaking the line, that way it's easier to grep.

767
771

Maybe print the actual error number too?

incorporate review feedback; rebase on top of changes to D52946

jtl marked 3 inline comments as done.Wed, Oct 8, 12:39 PM
This revision is now accepted and ready to land.Wed, Oct 8, 2:58 PM