[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210406093211.GI17806@zn.tnic>
Date: Tue, 6 Apr 2021 11:32:11 +0200
From: Borislav Petkov <bp@...en8.de>
To: Kai Huang <kai.huang@...el.com>
Cc: kvm@...r.kernel.org, linux-sgx@...r.kernel.org, x86@...nel.org,
linux-kernel@...r.kernel.org, seanjc@...gle.com, jarkko@...nel.org,
luto@...nel.org, dave.hansen@...el.com, rick.p.edgecombe@...el.com,
haitao.huang@...el.com, pbonzini@...hat.com, tglx@...utronix.de,
mingo@...hat.com, hpa@...or.com
Subject: Re: [PATCH v3 13/25] x86/sgx: Add helpers to expose ECREATE and
EINIT to KVM
On Tue, Apr 06, 2021 at 09:24:24PM +1200, Kai Huang wrote:
> Such invalid input has already been handled in handle_encls_xx() before calling
> the two helpers in this patch. KVM returns to Qemu and let it decide whether to
> kill or not. The access_ok()s here are trying to catch KVM bug.
Whatever they try to do, you cannot continue creating an enclave using
invalid input, no matter whether you've warned or not. People do not
stare at dmesg all the time.
> If so we'd better inject an exception to guest (and return 1) in KVM so guest
> can continue to run. Otherwise basically KVM will return to Qemu and let it
> decide (and basically it will kill guest).
>
> I think killing guest is also OK. KVM part patches needs to be updated, though,
> anyway.
Ok, I'll make the changes and you can redo the KVM rest ontop.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists