[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210327093840.f9e6c2dbfb14f4b2babc4924@intel.com>
Date: Sat, 27 Mar 2021 09:38:40 +1300
From: Kai Huang <kai.huang@...el.com>
To: Jarkko Sakkinen <jarkko@...nel.org>
Cc: kvm@...r.kernel.org, x86@...nel.org, linux-sgx@...r.kernel.org,
linux-kernel@...r.kernel.org, seanjc@...gle.com, luto@...nel.org,
dave.hansen@...el.com, rick.p.edgecombe@...el.com,
haitao.huang@...el.com, pbonzini@...hat.com, bp@...en8.de,
tglx@...utronix.de, mingo@...hat.com, hpa@...or.com
Subject: Re: [PATCH v4 03/25] x86/sgx: Wipe out EREMOVE from
sgx_free_epc_page()
> > diff --git a/arch/x86/kernel/cpu/sgx/sgx.h b/arch/x86/kernel/cpu/sgx/sgx.h
> > index 653af8ca1a25..6b21a165500e 100644
> > --- a/arch/x86/kernel/cpu/sgx/sgx.h
> > +++ b/arch/x86/kernel/cpu/sgx/sgx.h
> > @@ -13,6 +13,11 @@
> > #undef pr_fmt
> > #define pr_fmt(fmt) "sgx: " fmt
> >
> > +/* Error message for EREMOVE failure, when kernel is about to leak EPC page */
> > +#define EREMOVE_ERROR_MESSAGE \
> > + "EREMOVE returned %d (0x%x) and an EPC page was leaked. SGX may become unusuable. " \
> > + "This is likely a kernel bug. Refer to Documentation/x86/sgx.rst for more information."
>
>
> Why this needs to be here and not open coded where it is used?
>
I want to use it in sgx/virt.c as well. Please see my reply to patch 5.
Powered by blists - more mailing lists