There are a couple typos there, violating kernel-doc syntax.
Also, on a function typedef, the register snapshots aren't
documented.
This should fix those warnings:
arch/x86/include/uapi/asm/sgx.h:19: warning: Enum value 'SGX_PAGE_MEASURE' not described in enum 'sgx_page_flags'
arch/x86/include/uapi/asm/sgx.h:97: warning: Function parameter or member 'rdi' not described in 'sgx_enclave_user_handler_t'
arch/x86/include/uapi/asm/sgx.h:97: warning: Function parameter or member 'rsi' not described in 'sgx_enclave_user_handler_t'
arch/x86/include/uapi/asm/sgx.h:97: warning: Function parameter or member 'rdx' not described in 'sgx_enclave_user_handler_t'
arch/x86/include/uapi/asm/sgx.h:97: warning: Function parameter or member 'rsp' not described in 'sgx_enclave_user_handler_t'
arch/x86/include/uapi/asm/sgx.h:97: warning: Function parameter or member 'r8' not described in 'sgx_enclave_user_handler_t'
arch/x86/include/uapi/asm/sgx.h:97: warning: Function parameter or member 'r9' not described in 'sgx_enclave_user_handler_t'
arch/x86/include/uapi/asm/sgx.h:124: warning: Function parameter or member 'reserved' not described in 'sgx_enclave_run'
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
See [PATCH 00/22] at: https://lore.kernel.org/all/[email protected]/
arch/x86/include/uapi/asm/sgx.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/uapi/asm/sgx.h b/arch/x86/include/uapi/asm/sgx.h
index f4b81587e90b..e0e6a3ebc941 100644
--- a/arch/x86/include/uapi/asm/sgx.h
+++ b/arch/x86/include/uapi/asm/sgx.h
@@ -10,7 +10,7 @@
/**
* enum sgx_page_flags - page control flags
- * %SGX_PAGE_MEASURE: Measure the page contents with a sequence of
+ * @SGX_PAGE_MEASURE: Measure the page contents with a sequence of
* ENCLS[EEXTEND] operations.
*/
enum sgx_page_flags {
@@ -81,6 +81,12 @@ struct sgx_enclave_run;
/**
* typedef sgx_enclave_user_handler_t - Exit handler function accepted by
* __vdso_sgx_enter_enclave()
+ * @rdi: snapshot of DI register at enclave exit
+ * @rsi: snapshot of SI register at enclave exit
+ * @rdx: snapshot of DX register at enclave exit
+ * @rsp: snapshot of SP register at enclave exit
+ * @r8: snapshot of R8 register at enclave exit
+ * @r9: snapshot of R9 register at enclave exit
* @run: The run instance given by the caller
*
* The register parameters contain the snapshot of their values at enclave
@@ -104,7 +110,7 @@ typedef int (*sgx_enclave_user_handler_t)(long rdi, long rsi, long rdx,
* @exception_addr: The address that triggered the exception
* @user_handler: User provided callback run on exception
* @user_data: Data passed to the user handler
- * @reserved Reserved for future extensions
+ * @reserved: Reserved for future extensions
*
* If @user_handler is provided, the handler will be invoked on all return paths
* of the normal flow. The user handler may transfer control, e.g. via a
--
2.36.1
On Tue, Jun 28, 2022 at 10:46:08AM +0100, Mauro Carvalho Chehab wrote:
> There are a couple typos there, violating kernel-doc syntax.
>
> Also, on a function typedef, the register snapshots aren't
> documented.
>
> This should fix those warnings:
>
> arch/x86/include/uapi/asm/sgx.h:19: warning: Enum value 'SGX_PAGE_MEASURE' not described in enum 'sgx_page_flags'
> arch/x86/include/uapi/asm/sgx.h:97: warning: Function parameter or member 'rdi' not described in 'sgx_enclave_user_handler_t'
> arch/x86/include/uapi/asm/sgx.h:97: warning: Function parameter or member 'rsi' not described in 'sgx_enclave_user_handler_t'
> arch/x86/include/uapi/asm/sgx.h:97: warning: Function parameter or member 'rdx' not described in 'sgx_enclave_user_handler_t'
> arch/x86/include/uapi/asm/sgx.h:97: warning: Function parameter or member 'rsp' not described in 'sgx_enclave_user_handler_t'
> arch/x86/include/uapi/asm/sgx.h:97: warning: Function parameter or member 'r8' not described in 'sgx_enclave_user_handler_t'
> arch/x86/include/uapi/asm/sgx.h:97: warning: Function parameter or member 'r9' not described in 'sgx_enclave_user_handler_t'
> arch/x86/include/uapi/asm/sgx.h:124: warning: Function parameter or member 'reserved' not described in 'sgx_enclave_run'
>
> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
> ---
>
> To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
> See [PATCH 00/22] at: https://lore.kernel.org/all/[email protected]/
>
> arch/x86/include/uapi/asm/sgx.h | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/include/uapi/asm/sgx.h b/arch/x86/include/uapi/asm/sgx.h
> index f4b81587e90b..e0e6a3ebc941 100644
> --- a/arch/x86/include/uapi/asm/sgx.h
> +++ b/arch/x86/include/uapi/asm/sgx.h
> @@ -10,7 +10,7 @@
>
> /**
> * enum sgx_page_flags - page control flags
> - * %SGX_PAGE_MEASURE: Measure the page contents with a sequence of
> + * @SGX_PAGE_MEASURE: Measure the page contents with a sequence of
> * ENCLS[EEXTEND] operations.
> */
> enum sgx_page_flags {
> @@ -81,6 +81,12 @@ struct sgx_enclave_run;
> /**
> * typedef sgx_enclave_user_handler_t - Exit handler function accepted by
> * __vdso_sgx_enter_enclave()
> + * @rdi: snapshot of DI register at enclave exit
> + * @rsi: snapshot of SI register at enclave exit
> + * @rdx: snapshot of DX register at enclave exit
> + * @rsp: snapshot of SP register at enclave exit
> + * @r8: snapshot of R8 register at enclave exit
> + * @r9: snapshot of R9 register at enclave exit
> * @run: The run instance given by the caller
> *
> * The register parameters contain the snapshot of their values at enclave
> @@ -104,7 +110,7 @@ typedef int (*sgx_enclave_user_handler_t)(long rdi, long rsi, long rdx,
> * @exception_addr: The address that triggered the exception
> * @user_handler: User provided callback run on exception
> * @user_data: Data passed to the user handler
> - * @reserved Reserved for future extensions
> + * @reserved: Reserved for future extensions
> *
> * If @user_handler is provided, the handler will be invoked on all return paths
> * of the normal flow. The user handler may transfer control, e.g. via a
> --
> 2.36.1
>
I guess this also needs:
Fixes: 3fa97bf00126 ("Documentation/x86: Document SGX kernel architecture")
Other than that,
Reviewed-by: Jarkko Sakkinen <[email protected]>
BR, Jarkko
On 6/28/22 02:46, Mauro Carvalho Chehab wrote:
> + * @rdi: snapshot of DI register at enclave exit
> + * @rsi: snapshot of SI register at enclave exit
> + * @rdx: snapshot of DX register at enclave exit
> + * @rsp: snapshot of SP register at enclave exit
> + * @r8: snapshot of R8 register at enclave exit
> + * @r9: snapshot of R9 register at enclave exit
The 'DX register' really is different than RDX.
These should all have the full register names, like:
snapshot of RSP register at enclave exit
With that fixed:
Acked-by: Dave Hansen <[email protected]>