[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210325122343.008120ef70c1a1b16b5657ca@intel.com>
Date: Thu, 25 Mar 2021 12:23:43 +1300
From: Kai Huang <kai.huang@...el.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Borislav Petkov <bp@...en8.de>,
Sean Christopherson <seanjc@...gle.com>, kvm@...r.kernel.org,
x86@...nel.org, linux-sgx@...r.kernel.org,
linux-kernel@...r.kernel.org, jarkko@...nel.org, luto@...nel.org,
dave.hansen@...el.com, rick.p.edgecombe@...el.com,
haitao.huang@...el.com, tglx@...utronix.de, mingo@...hat.com,
hpa@...or.com
Subject: Re: [PATCH v3 03/25] x86/sgx: Wipe out EREMOVE from
sgx_free_epc_page()
>
> > +/* Error message for EREMOVE failure, when kernel is about to leak EPC page */
> > +#define EREMOVE_ERROR_MESSAGE \
> > + "EREMOVE returned %d (0x%x), kernel bug likely. EPC page leaked, SGX may become
> > unusuable. Please refer to Documentation/x86/sgx.rst for more information."
>
> Rewritten:
>
> EREMOVE returned %d and an EPC page was leaked; SGX may become unusable.
> This is a kernel bug, refer to Documentation/x86/sgx.rst for more information.
>
> Also please split it across multiple lines.
>
> Paolo
>
Hi Boris/Paolo,
I changed to below (with slight modification on Paolo's):
/* 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."
I got a checkpatch warning however:
WARNING: It's generally not useful to have the filename in the file
#60: FILE: Documentation/x86/sgx.rst:223:
+This is likely a kernel bug. Refer to Documentation/x86/sgx.rst for more
I suppose it is OK? Since the error msg is actually hard-coded in the code,
and in this document, IMHO we should explicitly call out what error message user
is supposed to see, when this bug happens, so that user can absolutely know
he/she is dealing with this particular issue.
Powered by blists - more mailing lists