summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc.rs
diff options
context:
space:
mode:
authorYazen Ghannam <yazen.ghannam@amd.com>2025-07-21 18:11:54 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-28 16:34:42 +0200
commit7d06af2fa25b41ecd9f470c3d2a8ff3757bae637 (patch)
treec32ccf505d0fbb510bc7c3c615e85b390e4d2402 /rust/kernel/alloc.rs
parent29c0ce3c8cdb6dc5d61139c937f34cb888a6f42e (diff)
x86/CPU/AMD: Ignore invalid reset reason value
commit e9576e078220c50ace9e9087355423de23e25fa5 upstream. The reset reason value may be "all bits set", e.g. 0xFFFFFFFF. This is a commonly used error response from hardware. This may occur due to a real hardware issue or when running in a VM. The user will see all reset reasons reported in this case. Check for an error response value and return early to avoid decoding invalid data. Also, adjust the data variable type to match the hardware register size. Fixes: ab8131028710 ("x86/CPU/AMD: Print the reason for the last reset") Reported-by: Libing He <libhe@redhat.com> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/20250721181155.3536023-1-yazen.ghannam@amd.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/kernel/alloc.rs')
0 files changed, 0 insertions, 0 deletions