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: <CAMkAt6pRVnx3vHkeBeJuf5kHgTF+c3Ydir+r9MRCPMAXic5eog@mail.gmail.com>
Date:   Thu, 3 Nov 2022 09:26:06 -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>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Joerg Roedel <jroedel@...e.de>,
        Thomas Gleixner <tglx@...utronix.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH v5 0/4] Add throttling detection to sev-guest

On Wed, Nov 2, 2022 at 9:18 AM Dionna Glaze <dionnaglaze@...gle.com> wrote:
>
> The guest request synchronous API from SEV-SNP VMs to the host's security
> processor consumes a global resource. For this reason, AMD's docs
> recommend that the host implements a throttling mechanism. In order for
> the guest to know it's been throttled and should try its request again,
> we need some good-faith communication from the host that the request
> has been throttled.
>
> These patches work with the existing /dev/sev-guest ABI to detect a
> throttling code.
>
> Changes from v4:
>   * Clarified comment on SEV_RET_NO_FW_CALL
>   * Changed ratelimit loop to use sleep_timeout_interruptible
> Changes from v3:
>   * sev-guest ratelimits itself to one request twice a second.
>   * Fixed a type signature to use u64 instead of unsigned int
>   * Set *exitinfo2 unconditionally after the ghcb_hv_call.
> Changes from v2:
>   * Codified the non-firmware-call firmware error code as (u32)-1.
>   * Changed sev_issue_guest_request unsigned long *fw_err argument to
>     u64 *exitinfo2 to more accurately and type-safely describe the
>     value that it outputs.
>   * Changed sev_issue_guest_request to always set its exitinfo2
>     argument to either the non-firmware-call error code, the
>     EXIT_INFO_2 returned from the VMM if the request failed, or 0 on
>     success. This fixes a bug that returned uninitialized kernel stack
>     memory to the user when there is no error.
>   * Changed the throttle behavior to retry in the driver instead of
>     returning -EAGAIN, due to possible message sequence number reuse
>     on different message contents.
>
> Changes from v1:
>   * Changed throttle error code to 2
>
> Cc: Tom Lendacky <Thomas.Lendacky@....com>
> Cc: Paolo Bonzini <pbonzini@...hat.com>
> Cc: Joerg Roedel <jroedel@...e.de>
> Cc: Peter Gonda <pgonda@...gle.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Dave Hansen <dave.hansen@...ux.intel.com>
>
> Signed-off-by: Dionna Glaze <dionnaglaze@...gle.com>

Should this change be rebased on top of the 'virt: sev: Prevent IV
reuse in SNP guest driver'?
https://lore.kernel.org/lkml/20221103152318.88354-1-pgonda@google.com/

Since that change is a security fix?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ