Summary: | Page fault in _mca_init during boot | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Alan Somers <asomers> | ||||
Component: | kern | Assignee: | Mark Johnston <markj> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Many People | CC: | kib-bugs, markj, mmacy | ||||
Priority: | --- | ||||||
Version: | 12.2-RELEASE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Alan Somers
2021-02-05 16:23:11 UTC
Created attachment 222184 [details] Unconditionally allocate the cmci memory This patch from kib@FreeBSD.org attempts to fix the problem by unconditionally allocating memory for cmc_state, regardless of the MCG_CAP_CMCI_P bit. I updated the BIOS from version 5.12, aka 2/24/2018 Rev 2.0b, to 5.14, aka 10/30/2020 Rev 3.4. That fixed the problem. Now all CPUs show the MCG_CMCI_P bit disabled. $ for i in `seq 0 31`; do sudo cpucontrol -m 0x179 /dev/cpuctl${i}; done | uniq -c 32 MSR 0x179: 0x00000000 0x0f000814 A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=b5770470276268acef21368b3e77a325df883500 commit b5770470276268acef21368b3e77a325df883500 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2021-02-08 19:42:54 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-02-08 19:42:54 +0000 mca: Handle inconsistent CMCI capability reporting A BIOS bug may apparently cause the BSP to report that it does not implement CMCI, with some APs reporting that they do. In this scenario, avoid a NULL pointer dereference that occurs in cmci_monitor() because cmc_state was not allocated by the BSP. PR: 253272 Reported by: asomers, mmacy Reviewed by: kib (previous version) MFC after: 1 week sys/x86/x86/mca.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=8eebd9592e3daf80c2c743666614119d6c862186 commit 8eebd9592e3daf80c2c743666614119d6c862186 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2021-02-08 19:42:54 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-02-15 19:12:41 +0000 mca: Handle inconsistent CMCI capability reporting A BIOS bug may apparently cause the BSP to report that it does not implement CMCI, with some APs reporting that they do. In this scenario, avoid a NULL pointer dereference that occurs in cmci_monitor() because cmc_state was not allocated by the BSP. PR: 253272 Reported by: asomers, mmacy Reviewed by: kib (previous version) (cherry picked from commit b5770470276268acef21368b3e77a325df883500) sys/x86/x86/mca.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=dadf603f0f7b54c65fa5f16f552ae6da12f8210b commit dadf603f0f7b54c65fa5f16f552ae6da12f8210b Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2021-02-08 19:42:54 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-02-15 19:47:04 +0000 mca: Handle inconsistent CMCI capability reporting A BIOS bug may apparently cause the BSP to report that it does not implement CMCI, with some APs reporting that they do. In this scenario, avoid a NULL pointer dereference that occurs in cmci_monitor() because cmc_state was not allocated by the BSP. PR: 253272 Reported by: asomers, mmacy Reviewed by: kib (previous version) (cherry picked from commit b5770470276268acef21368b3e77a325df883500) sys/x86/x86/mca.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) A commit in branch releng/13.0 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=f560a8b1a4edd1b8a9f110ae2edaa7a3307e9034 commit f560a8b1a4edd1b8a9f110ae2edaa7a3307e9034 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2021-02-16 17:07:43 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-02-16 17:07:43 +0000 mca: Handle inconsistent CMCI capability reporting A BIOS bug may apparently cause the BSP to report that it does not implement CMCI, with some APs reporting that they do. In this scenario, avoid a NULL pointer dereference that occurs in cmci_monitor() because cmc_state was not allocated by the BSP. Approved by: re (gjb) PR: 253272 Reported by: asomers, mmacy Reviewed by: kib (previous version) (cherry picked from commit b5770470276268acef21368b3e77a325df883500) (cherry picked from commit 8eebd9592e3daf80c2c743666614119d6c862186) sys/x86/x86/mca.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) |