From 3a535ae6fd3c6ce8b96ff9a6f5f281b36a383138 Mon Sep 17 00:00:00 2001 From: Pradyumn Rahar Date: Thu, 30 May 2024 20:59:59 +0530 Subject: [PATCH] Fix cpuinfo crash on OL8 RHCK Signed-off-by: Pradyumn Rahar --- drgn_tools/cpuinfo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drgn_tools/cpuinfo.py b/drgn_tools/cpuinfo.py index 84d35c43..1cc993a8 100644 --- a/drgn_tools/cpuinfo.py +++ b/drgn_tools/cpuinfo.py @@ -309,7 +309,10 @@ def get_spectre_v2_mitigation(prog: Program, cpu_caps_bugs: Object) -> str: if test_bit(X86_FEATURE_RSB_CTXSW, cpu_caps_bugs): mitigation += ", RSB filling" - if prog["spectre_v2_bad_module"]: + if ( + "spectre_v2_bad_module" in prog + and prog["spectre_v2_bad_module"] + ): mitigation += " - vulnerable module loaded" return mitigation