summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/mem-phys-addr.py
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@amd.com>2026-08-31 16:09:16 -0500
committerBorislav Petkov (AMD) <bp@alien8.de>2026-10-02 15:48:29 -0700
commit1847c80537891baead3975f3ca969233ff7b2a11 (patch)
tree4ebc101373dc01e5773c5f08fbcd633917716b73 /tools/perf/scripts/python/mem-phys-addr.py
parentae1d2082d93bc04604dc08e9b7f9cdba5e0c28e6 (diff)
x86/bugs: Fix CONFIG_MITIGATION_RETPOLINE=n mitigation reporting
When the kernel lacks retpoline support, spectre_v2_select_retpoline() emits "Kernel not compiled with retpoline; no mitigation available!" before returning SPECTRE_V2_NONE to its callers. SPECTRE_V2_NONE is not the final answer, though: spectre_v2_update_mitigation() runs afterwards and can still upgrade the mitigation. On an Intel CPU affected by RETBleed, built with CONFIG_MITIGATION_IBRS_ENTRY=y and CONFIG_MITIGATION_RETPOLINE=n, and booted with spectre_v2=auto, retbleed_select_mitigation() picks RETBLEED_MITIGATION_IBRS, and spectre_v2_update_mitigation() then promotes SPECTRE_V2_NONE to SPECTRE_V2_IBRS. The boot log claims no mitigation is available immediately before reporting "Spectre V2 : Mitigation: IBRS", and sysfs reports the machine as mitigated. The message is alarming and simply wrong. Drop "no mitigation available!" because the final mitigation state is printed afterwards in spectre_v2_update_mitigation() anyway. [ bp: Drop CC:stable, massage commit message. ] Fixes: 480e803dacf8 ("x86/bugs: Restructure spectre_v2 mitigation") Suggested-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com> Assisted-by: LLM Signed-off-by: Kim Phillips <kim.phillips@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com> Link: https://patch.msgid.link/20260831210916.987152-1-kim.phillips@amd.com
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions