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: <CAAH4kHaMCP0-=D1-QnsXa7wAtt22ZdTJD999hphKTpEQuM18aA@mail.gmail.com>
Date:   Thu, 16 Feb 2023 08:43:54 -0800
From:   Dionna Amalie Glaze <dionnaglaze@...gle.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Joerg Roedel <jroedel@...e.de>,
        Michael Roth <michael.roth@....com>,
        Nikunj A Dadhania <nikunj@....com>,
        Peter Gonda <pgonda@...gle.com>,
        Tom Lendacky <Thomas.Lendacky@....com>,
        linux-coco@...ts.linux.dev, x86@...nel.org
Subject: Re: [PATCH 03/11] virt/coco/sev-guest: Simplify extended guest
 request handling

>         if (ghcb->save.sw_exit_info_2) {
>                 /* Number of expected pages are returned in RBX */
>                 if (exit_code == SVM_VMGEXIT_EXT_GUEST_REQUEST &&
> -                   ghcb->save.sw_exit_info_2 == SNP_GUEST_REQ_INVALID_LEN)
> +                   ghcb->save.sw_exit_info_2 == SNP_GUEST_REQ_INVALID_LEN) {
>                         input->data_npages = ghcb_get_rbx(ghcb);
> +                       ret = -ENOSPC;
> +               } else {
> +                       ret = -EIO;
> +               }
>
>                 *fw_err = ghcb->save.sw_exit_info_2;
> -
> -               ret = -EIO;
>         }

I think *fw_err still needs to be hoisted out of this if block so that
a 0 fw_err gets written back to user space rather than the 0xff
placeholder. The 0 would more correctly indicate the lack of an error.


-- 
-Dionna Glaze, PhD (she/her)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ