This is a note to let you know that I've just added the patch titled x86/bugs: Flush IBP in ib_prctl_set() to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: x86-bugs-flush-ibp-in-ib_prctl_set.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From a664ec9158eeddd75121d39c9a0758016097fa96 Mon Sep 17 00:00:00 2001 From: Rodrigo Branco <bsdaemon@xxxxxxxxxx> Date: Tue, 3 Jan 2023 14:17:51 -0600 Subject: x86/bugs: Flush IBP in ib_prctl_set() From: Rodrigo Branco <bsdaemon@xxxxxxxxxx> commit a664ec9158eeddd75121d39c9a0758016097fa96 upstream. We missed the window between the TIF flag update and the next reschedule. Signed-off-by: Rodrigo Branco <bsdaemon@xxxxxxxxxx> Reviewed-by: Borislav Petkov (AMD) <bp@xxxxxxxxx> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/x86/kernel/cpu/bugs.c | 2 ++ 1 file changed, 2 insertions(+) --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -1778,6 +1778,8 @@ static int ib_prctl_set(struct task_stru if (ctrl == PR_SPEC_FORCE_DISABLE) task_set_spec_ib_force_disable(task); task_update_spec_tif(task); + if (task == current) + indirect_branch_prediction_barrier(); break; default: return -ERANGE; Patches currently in stable-queue which might be from bsdaemon@xxxxxxxxxx are queue-4.19/x86-bugs-flush-ibp-in-ib_prctl_set.patch