Re: [PATCH for_v29 3/8] x86/sgx: vdso: Make __vdso_sgx_enter_enclave() callable from C code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 19, 2020 at 01:03:41PM -0700, Xing, Cedric wrote:
> On 3/18/2020 6:11 PM, Sean Christopherson wrote:
> >  #endif
> >  SYM_FUNC_START(__vdso_sgx_enter_enclave)
> >  	/* Prolog */
> >@@ -82,7 +84,9 @@ SYM_FUNC_START(__vdso_sgx_enter_enclave)
> >  	.cfi_rel_offset		%rbp, 0
> >  	mov	%rsp, %rbp
> >  	.cfi_def_cfa_register	%rbp
> >+	push	%rbx
> A CFI directive is needed here:
> 
> 	.cfi_rel_offset 	%rbx, -8

Darn, I suspected as much, but wasn't 100% positive.  Shouldn't have
hedged.  :-)

Is the rule of thumb for adding directives that one is needed any time
there is a new saved value of a register, or if the relative address of
the last saved value changes?  Are CFI directives only used for
non-volatile registers?

> >+	mov	%ecx, %eax
> >  .Lenter_enclave:
> >  	/* EENTER <= leaf <= ERESUME */
> >  	cmp	$0x2, %eax
> >@@ -108,6 +112,7 @@ SYM_FUNC_START(__vdso_sgx_enter_enclave)
> >  	jne	.Linvoke_userspace_handler
> >  .Lout:
> >+	pop	%rbx
> >  	leave
> >  	.cfi_def_cfa		%rsp, 8
> >  	ret
> >



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux