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: <20200925134149.GI31722@suse.de>
Date:   Fri, 25 Sep 2020 15:41:49 +0200
From:   Joerg Roedel <jroedel@...e.de>
To:     Tom Lendacky <thomas.lendacky@....com>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] x86/sev-es: Use GHCB accessor for setting the MMIO
 scratch buffer

On Fri, Sep 25, 2020 at 08:38:26AM -0500, Tom Lendacky wrote:
> From: Tom Lendacky <thomas.lendacky@....com>
> 
> Use ghcb_set_sw_scratch() to set the GHCB scratch field, which will also
> set the corresponding bit in the GHCB valid_bitmap field.
> 
> Signed-off-by: Tom Lendacky <thomas.lendacky@....com>
> ---
>  arch/x86/kernel/sev-es.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/sev-es.c b/arch/x86/kernel/sev-es.c
> index 6fcfdd32769f..4a96726fbaf8 100644
> --- a/arch/x86/kernel/sev-es.c
> +++ b/arch/x86/kernel/sev-es.c
> @@ -751,7 +751,7 @@ static enum es_result vc_do_mmio(struct ghcb *ghcb, struct es_em_ctxt *ctxt,
>  	/* Can never be greater than 8 */
>  	exit_info_2 = bytes;
>  
> -	ghcb->save.sw_scratch = ghcb_pa + offsetof(struct ghcb, shared_buffer);
> +	ghcb_set_sw_scratch(ghcb, ghcb_pa + offsetof(struct ghcb, shared_buffer));

Reviewed-by: Joerg Roedel <jroedel@...e.de>

Thanks for catching this!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ