Re: [PATCH v2] x86/mtrr: Check if fixed-range MTRR exists in mtrr_save_fixed_ranges()
From: Borislav Petkov
Date: Fri May 09 2025 - 13:33:17 EST
On Fri, May 09, 2025 at 05:06:33PM +0000, Jiaqing Zhao wrote:
> When suspending, save_processor_state() calls mtrr_save_fixed_ranges()
> to save fixed-range MTRRs. On platforms without fixed-range MTRRs,
> accessing these MSRs will trigger unchecked MSR access error. Make
> sure fixed-range MTRRs are supported before access to prevent such
> error.
>
> Since mtrr_state.have_fixed is only set when MTRRs are present and
> enabled, checking the CPU feature flag in mtrr_save_fixed_ranges()
> is unnecessary.
>
> Fixes: 3ebad5905609 ("[PATCH] x86: Save and restore the fixed-range MTRRs of the BSP when suspending")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Jiaqing Zhao <jiaqing.zhao@xxxxxxxxxxxxxxx>
Next question: this is CC:stable, meaning it'll go to Linus now.
What exactly is it fixing?
Because the patch in Fixes: is from 2007. :-\
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette