Re: [PATCH V2] LoongArch: Ensure FP/SIMD registers in the core dump file is up to date

From: Greg KH
Date: Sat Aug 26 2023 - 11:23:31 EST


On Sat, Aug 26, 2023 at 10:23:41PM +0800, Huacai Chen wrote:
> This is a port of commit 379eb01c21795edb4c ("riscv: Ensure the value
> of FP registers in the core dump file is up to date").
>
> The values of FP/SIMD registers in the core dump file come from the
> thread.fpu. However, kernel saves the FP/SIMD registers only before
> scheduling out the process. If no process switch happens during the
> exception handling, kernel will not have a chance to save the latest
> values of FP/SIMD registers. So it may cause their values in the core
> dump file incorrect. To solve this problem, force fpr_get()/simd_get()
> to save the FP/SIMD registers into the thread.fpu if the target task
> equals the current task.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
> ---
> V2: Rename get_fpu_regs() to save_fpu_regs().

What stable tree(s) is this for?

thanks,

greg k-h