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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230111194001.1947849-8-dionnaglaze@google.com>
Date:   Wed, 11 Jan 2023 19:40:01 +0000
From:   Dionna Glaze <dionnaglaze@...gle.com>
To:     linux-kernel@...r.kernel.org, x86@...nel.org
Cc:     Dionna Glaze <dionnaglaze@...gle.com>,
        Borislav Petkov <Borislav.Petkov@....com>,
        Peter Gonda <pgonda@...gle.com>,
        Thomas Lendacky <Thomas.Lendacky@....com>
Subject: [PATCH v11 7/7] x86/sev: Remove temporary typedef

The sev_guestreq_err_t typedef has served its purpose for cleanly
changing the sev_issue_guest_request signature, so it's no longer
needed.

Cc: Borislav Petkov <Borislav.Petkov@....com>
Cc: Peter Gonda <pgonda@...gle.com>
Cc: Thomas Lendacky <Thomas.Lendacky@....com>

Signed-off-by: Dionna Glaze <dionnaglaze@...gle.com>
---
 arch/x86/include/asm/sev.h | 10 ++--------
 arch/x86/kernel/sev.c      |  2 +-
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/arch/x86/include/asm/sev.h b/arch/x86/include/asm/sev.h
index 301e3b69f477..05de34d10d89 100644
--- a/arch/x86/include/asm/sev.h
+++ b/arch/x86/include/asm/sev.h
@@ -133,12 +133,6 @@ struct snp_secrets_page_layout {
 	u8 rsvd3[3840];
 } __packed;
 
-/*
- * Use a type alias temporarily to cleanly change the snp_issue_guest_request
- * signature cleanly over multiple patches.
- */
-typedef u64 sev_guestreq_err_t;
-
 #ifdef CONFIG_AMD_MEM_ENCRYPT
 extern struct static_key_false sev_es_enable_key;
 extern void __sev_es_ist_enter(struct pt_regs *regs);
@@ -202,7 +196,7 @@ void snp_set_memory_private(unsigned long vaddr, unsigned int npages);
 void snp_set_wakeup_secondary_cpu(void);
 bool snp_init(struct boot_params *bp);
 void __init __noreturn snp_abort(void);
-int snp_issue_guest_request(u64 exit_code, struct snp_req_data *input, sev_guestreq_err_t *exitinfo2);
+int snp_issue_guest_request(u64 exit_code, struct snp_req_data *input, u64 *exitinfo2);
 #else
 static inline void sev_es_ist_enter(struct pt_regs *regs) { }
 static inline void sev_es_ist_exit(void) { }
@@ -223,7 +217,7 @@ static inline void snp_set_wakeup_secondary_cpu(void) { }
 static inline bool snp_init(struct boot_params *bp) { return false; }
 static inline void snp_abort(void) { }
 static inline int snp_issue_guest_request(u64 exit_code, struct snp_req_data *input,
-					  sev_guestreq_err_t *exitinfo2)
+					  u64 *exitinfo2)
 {
 	return -ENOTTY;
 }
diff --git a/arch/x86/kernel/sev.c b/arch/x86/kernel/sev.c
index d1a6092b1e03..70b4cbd33c45 100644
--- a/arch/x86/kernel/sev.c
+++ b/arch/x86/kernel/sev.c
@@ -2176,7 +2176,7 @@ static int __init init_sev_config(char *str)
 }
 __setup("sev=", init_sev_config);
 
-int snp_issue_guest_request(u64 exit_code, struct snp_req_data *input, sev_guestreq_err_t *exitinfo2)
+int snp_issue_guest_request(u64 exit_code, struct snp_req_data *input, u64 *exitinfo2)
 {
 	struct ghcb_state state;
 	struct es_em_ctxt ctxt;
-- 
2.39.0.314.g84b9a713c41-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ