lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 04 Jan 2023 11:58:57 -0000
From:   "tip-bot2 for Rodrigo Branco" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Rodrigo Branco <bsdaemon@...gle.com>,
        "Borislav Petkov (AMD)" <bp@...en8.de>,
        Ingo Molnar <mingo@...nel.org>, <stable@...r.kernel.org>,
        x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: x86/urgent] x86/bugs: Flush IBP in ib_prctl_set()

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     a664ec9158eeddd75121d39c9a0758016097fa96
Gitweb:        https://git.kernel.org/tip/a664ec9158eeddd75121d39c9a0758016097fa96
Author:        Rodrigo Branco <bsdaemon@...gle.com>
AuthorDate:    Tue, 03 Jan 2023 14:17:51 -06:00
Committer:     Ingo Molnar <mingo@...nel.org>
CommitterDate: Wed, 04 Jan 2023 11:25:32 +01:00

x86/bugs: Flush IBP in ib_prctl_set()

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

Signed-off-by: Rodrigo Branco <bsdaemon@...gle.com>
Reviewed-by: Borislav Petkov (AMD) <bp@...en8.de>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Cc: <stable@...r.kernel.org>
---
 arch/x86/kernel/cpu/bugs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index d970ddb..bca0bd8 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -1981,6 +1981,8 @@ static int ib_prctl_set(struct task_struct *task, unsigned long ctrl)
 		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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ