Skip to content

Commit 243ea51

Browse files
sean-jchansendc
authored andcommitted
x86/sgx: Add kernel-doc descriptions for params passed to vDSO user handler
Add kernel-doc markup for the register parameters passed by the vDSO blob to the user handler to suppress build warnings, e.g. WARNING: arch/x86/include/uapi/asm/sgx.h:157 function parameter 'r8' not described in 'sgx_enclave_user_handler_t' Call out that except for RSP, the registers are undefined on asynchronous exits as far as the vDSO ABI is concerned. E.g. the vDSO's exception handler clobbers RDX, RDI, and RSI, and the kernel doesn't guarantee that R8 or R9 will be zero (the synthetic value loaded by the CPU). Closes: https://lore.kernel.org/all/20251106145506.145fc620@canb.auug.org.au Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Kai Huang <kai.huang@intel.com> Link: https://patch.msgid.link/20251112160708.1343355-3-seanjc%40google.com
1 parent 75801ca commit 243ea51

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • arch/x86/include/uapi/asm

arch/x86/include/uapi/asm/sgx.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ struct sgx_enclave_run;
143143
/**
144144
* typedef sgx_enclave_user_handler_t - Exit handler function accepted by
145145
* __vdso_sgx_enter_enclave()
146+
* @rdi: RDI at the time of EEXIT, undefined on AEX
147+
* @rsi: RSI at the time of EEXIT, undefined on AEX
148+
* @rdx: RDX at the time of EEXIT, undefined on AEX
149+
* @rsp: RSP (untrusted) at the time of EEXIT or AEX
150+
* @r8: R8 at the time of EEXIT, undefined on AEX
151+
* @r9: R9 at the time of EEXIT, undefined on AEX
146152
* @run: The run instance given by the caller
147153
*
148154
* The register parameters contain the snapshot of their values at enclave

0 commit comments

Comments
 (0)