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]
Date:   Fri, 4 Nov 2022 15:50:49 -0600
From:   Peter Gonda <pgonda@...gle.com>
To:     Dionna Glaze <dionnaglaze@...gle.com>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org,
        Tom Lendacky <Thomas.Lendacky@....com>,
        Borislav Petkov <bp@...e.de>,
        Liam Merwick <liam.merwick@...cle.com>,
        Yang Yingliang <yangyingliang@...wei.com>,
        Haowen Bai <baihaowen@...zu.com>
Subject: Re: [PATCH v7 4/4] virt: sev-guest: interpret VMM errors from guest request

> diff --git a/include/uapi/linux/sev-guest.h b/include/uapi/linux/sev-guest.h
> index 256aaeff7e65..8e4144aa78c9 100644
> --- a/include/uapi/linux/sev-guest.h
> +++ b/include/uapi/linux/sev-guest.h
> @@ -52,8 +52,15 @@ struct snp_guest_request_ioctl {
>         __u64 req_data;
>         __u64 resp_data;
>
> -       /* firmware error code on failure (see psp-sev.h) */
> -       __u64 fw_err;
> +       /* bits[63:32]: VMM error code, bits[31:0] firmware error code (see psp-sev.h) */
> +       union {
> +               __u64 exitinfo2;
> +               __u64 fw_err; /* Name deprecated in favor of others */
> +               struct {
> +                       __u32 fw_error;
> +                       __u32 vmm_error;
> +               };
> +       };
>  };

LGTM, especially with feedback on the last path for just passing
snp_guest_request_ioctl. But thats a nit.

>
>  struct snp_ext_report_req {
> @@ -77,4 +84,11 @@ struct snp_ext_report_req {
>  /* Get SNP extended report as defined in the GHCB specification version 2. */
>  #define SNP_GET_EXT_REPORT _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x2, struct snp_guest_request_ioctl)
>
> +/* Guest message request EXIT_INFO_2 constants */
> +#define SNP_GUEST_FW_ERR_MASK          GENMASK_ULL(31, 0)
> +#define SNP_GUEST_VMM_ERR_SHIFT                32
> +
> +#define SNP_GUEST_VMM_ERR_INVALID_LEN  1
> +#define SNP_GUEST_VMM_ERR_BUSY         2
> +
>  #endif /* __UAPI_LINUX_SEV_GUEST_H_ */
> --
> 2.38.1.431.g37b22c650d-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ