Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for the X86_64 "bt" command on Linux 3.3 and later kernels to
properly display exception frame register contents on NMI stacks. Kernel commit 3f3c8b8c4b2a34776c3470142a7c8baafcda6eb0 added 12 more values to the NMI exception stack to handle nested NMIs caused by page faults or breakpoints that could occur while handling an NMI exception. The fix has two parts: 1. Determine if this kernel has the nested NMI layout and set a machine-specific flag (NESTED_NMI) if it does. 2. When backtracing an NMI stack, use the saved values instead of those found at the top of stack. Kernel commit 28696f434fef0efa97534b59986ad33b9c4df7f8 changed the stack layout again, swapping the location of the "saved" and "copied" registers. This can be detected automatically, because the "copied" registers contain either a copy of the "saved" registers, or point to "repeat_nmi". So, if "repeat_nmi" is found as the return address, assume that this is the old layout, and adjust the stack pointer again. Without the patch, incorrect register values are displayed in the exception frame dump in the NMI stack backtrace. (ptesarik@suse.cz)
- Loading branch information
Dave Anderson
committed
Apr 30, 2014
1 parent
566e8e8
commit 8e15958
Showing
2 changed files
with
59 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters