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]
Message-ID: <CAMkAt6qTF0oMFJg0ZJsyUY88TegjuETdLj9WsJvDG+jDxO_Thg@mail.gmail.com>
Date:   Tue, 5 Sep 2023 15:08:16 -0600
From:   Peter Gonda <pgonda@...gle.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     kvm@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>,
        Tom Lendacky <thomas.lendacky@....com>,
        Joerg Roedel <joro@...tes.org>, Borislav Petkov <bp@...en8.de>,
        x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: SEV: Update SEV-ES shutdown intercepts with more metadata

On Tue, Sep 5, 2023 at 2:58 PM Sean Christopherson <seanjc@...gle.com> wrote:
>
> On Tue, Sep 05, 2023, Peter Gonda wrote:
> > Currently if an SEV-ES VM shuts down userspace sees KVM_RUN struct with
> > only the INVALID_ARGUMENT. This is a very limited amount of information
> > to debug the situation. Instead KVM can return a
> > KVM_SYSTEM_EVENT_SEV_TERM to alert userspace the VM is shutting down and
> > is not usable any further. This latter point can be enforced using the
> > kvm_vm_dead() functionality.
>
> Add the kvm_vm_dead() thing in a separate patch.  If we want to actually harden
> KVM against consuming a garbage VMSA then we do need to mark the VM dead, but on
> the other hand that will block _all_ KVM ioctls(), which will make debug even
> harder.

Will do. Do we have better functionality for just blocking running the vCPU?

>
> > Signed-off-by: Peter Gonda <pgonda@...gle.com>
> > Cc: Paolo Bonzini <pbonzini@...hat.com>
> > Cc: Sean Christopherson <seanjc@...gle.com>
> > Cc: Tom Lendacky <thomas.lendacky@....com>
> > Cc: Joerg Roedel <joro@...tes.org>
> > Cc: Borislav Petkov <bp@...en8.de>
> > Cc: x86@...nel.org
> > Cc: kvm@...r.kernel.org
> > Cc: linux-kernel@...r.kernel.org
> >
> > ---
> >
> > I am not sure if this is the right path forward maybe just returning
> > KVM_EXIT_SHUTDOWN is better. But the current behavior is very unhelpful.
>
> Ya, KVM_EXIT_SHUTDOWN is better, we should leave KVM_SYSTEM_EVENT_SEV_TERM to
> explicit "requests" from the guest.

Sounds good to me. I'll send a V2 that just updates to KVM_EXIT_SHUTDOWN.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ