Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 940ede60 authored by Rodrigo Branco's avatar Rodrigo Branco Committed by Greg Kroah-Hartman
Browse files

x86/bugs: Flush IBP in ib_prctl_set()



commit a664ec9158eeddd75121d39c9a0758016097fa96 upstream.

We missed the window between the TIF flag update and the next reschedule.

Signed-off-by: default avatarRodrigo Branco <bsdaemon@google.com>
Reviewed-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c2d46555
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1778,6 +1778,8 @@ static int ib_prctl_set(struct task_struct *task, unsigned long ctrl)
		if (ctrl == PR_SPEC_FORCE_DISABLE)
		if (ctrl == PR_SPEC_FORCE_DISABLE)
			task_set_spec_ib_force_disable(task);
			task_set_spec_ib_force_disable(task);
		task_update_spec_tif(task);
		task_update_spec_tif(task);
		if (task == current)
			indirect_branch_prediction_barrier();
		break;
		break;
	default:
	default:
		return -ERANGE;
		return -ERANGE;