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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <164940891535.389.15036684109710307726.tip-bot2@tip-bot2>
Date:   Fri, 08 Apr 2022 09:08:35 -0000
From:   "tip-bot2 for Peter Gonda" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Peter Gonda <pgonda@...gle.com>, Borislav Petkov <bp@...e.de>,
        Joerg Roedel <jroedel@...e.de>, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: [tip: x86/sev] x86/sev-es: Replace open-coded hlt-loop with
 sev_es_terminate()

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

Commit-ID:     e720ea52e85c9d00cf8c5769795d0a3e585524f6
Gitweb:        https://git.kernel.org/tip/e720ea52e85c9d00cf8c5769795d0a3e585524f6
Author:        Peter Gonda <pgonda@...gle.com>
AuthorDate:    Thu, 17 Mar 2022 14:19:13 -07:00
Committer:     Borislav Petkov <bp@...e.de>
CommitterDate: Fri, 08 Apr 2022 10:57:35 +02:00

x86/sev-es: Replace open-coded hlt-loop with sev_es_terminate()

Replace the halt loop in handle_vc_boot_ghcb() with an
sev_es_terminate(). The HLT gives the system no indication the guest is
unhappy. The termination request will signal there was an error during
VC handling during boot.

  [ bp: Update it to pass the reason set too. ]

Signed-off-by: Peter Gonda <pgonda@...gle.com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Reviewed-by: Joerg Roedel <jroedel@...e.de>
Link: https://lore.kernel.org/r/20220317211913.1397427-1-pgonda@google.com
---
 arch/x86/kernel/sev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/kernel/sev.c b/arch/x86/kernel/sev.c
index ace43e1..f01f455 100644
--- a/arch/x86/kernel/sev.c
+++ b/arch/x86/kernel/sev.c
@@ -1982,8 +1982,7 @@ bool __init handle_vc_boot_ghcb(struct pt_regs *regs)
 fail:
 	show_regs(regs);
 
-	while (true)
-		halt();
+	sev_es_terminate(SEV_TERM_SET_GEN, GHCB_SEV_ES_GEN_REQ);
 }
 
 /*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ