diff options
author | Yazen Ghannam <yazen.ghannam@amd.com> | 2023-08-14 15:08:53 -0500 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2023-08-18 13:05:52 +0200 |
commit | 4240e2ebe67941ce2c4f5c866c3af4b5ac7a0c67 (patch) | |
tree | 1ef3c5ad4e37235fb7da8b1ead8418e6f773227f /fs/verity/fsverity_private.h | |
parent | c3629dd7e67d6ec5705d33b0de0d142c972fe573 (diff) |
x86/MCE: Always save CS register on AMD Zen IF Poison errors
The Instruction Fetch (IF) units on current AMD Zen-based systems do not
guarantee a synchronous #MC is delivered for poison consumption errors.
Therefore, MCG_STATUS[EIPV|RIPV] will not be set. However, the
microarchitecture does guarantee that the exception is delivered within
the same context. In other words, the exact rIP is not known, but the
context is known to not have changed.
There is no architecturally-defined method to determine this behavior.
The Code Segment (CS) register is always valid on such IF unit poison
errors regardless of the value of MCG_STATUS[EIPV|RIPV].
Add a quirk to save the CS register for poison consumption from the IF
unit banks.
This is needed to properly determine the context of the error.
Otherwise, the severity grading function will assume the context is
IN_KERNEL due to the m->cs value being 0 (the initialized value). This
leads to unnecessary kernel panics on data poison errors due to the
kernel believing the poison consumption occurred in kernel context.
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230814200853.29258-1-yazen.ghannam@amd.com
Diffstat (limited to 'fs/verity/fsverity_private.h')
0 files changed, 0 insertions, 0 deletions