Message ID | 20191011004059.28581-4-sean.j.christopherson@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86/vdso: sgx: Bug fixes | expand |
On 10/10/2019 5:40 PM, Sean Christopherson wrote: > Relocate the .cfi_endproc directive to the RET that actually returns > from the vDSO function. During recent refactoring, it was inadvertantly > left next to the RET used for the retpoline. > > Reported-by: Cedric Xing <cedric.xing@intel.com> > Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> > --- > arch/x86/entry/vdso/vsgx_enter_enclave.S | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/entry/vdso/vsgx_enter_enclave.S b/arch/x86/entry/vdso/vsgx_enter_enclave.S > index b63091818df1..3dd22780b7ef 100644 > --- a/arch/x86/entry/vdso/vsgx_enter_enclave.S > +++ b/arch/x86/entry/vdso/vsgx_enter_enclave.S > @@ -113,6 +113,7 @@ ENTRY(__vdso_sgx_enter_enclave) > leave > .cfi_def_cfa %rsp, 8 > ret > + .cfi_endproc As mentioned in my other email, the above won't work. > > .Linvalid_leaf: > mov $(-EINVAL), %eax > @@ -176,7 +177,6 @@ ENTRY(__vdso_sgx_enter_enclave) > jmp 1b > 2: mov %rax, (%rsp) > ret > - .cfi_endproc > > _ASM_VDSO_EXTABLE_HANDLE(.Lenclu_eenter_eresume, .Lhandle_exception) > >
diff --git a/arch/x86/entry/vdso/vsgx_enter_enclave.S b/arch/x86/entry/vdso/vsgx_enter_enclave.S index b63091818df1..3dd22780b7ef 100644 --- a/arch/x86/entry/vdso/vsgx_enter_enclave.S +++ b/arch/x86/entry/vdso/vsgx_enter_enclave.S @@ -113,6 +113,7 @@ ENTRY(__vdso_sgx_enter_enclave) leave .cfi_def_cfa %rsp, 8 ret + .cfi_endproc .Linvalid_leaf: mov $(-EINVAL), %eax @@ -176,7 +177,6 @@ ENTRY(__vdso_sgx_enter_enclave) jmp 1b 2: mov %rax, (%rsp) ret - .cfi_endproc _ASM_VDSO_EXTABLE_HANDLE(.Lenclu_eenter_eresume, .Lhandle_exception)
Relocate the .cfi_endproc directive to the RET that actually returns from the vDSO function. During recent refactoring, it was inadvertantly left next to the RET used for the retpoline. Reported-by: Cedric Xing <cedric.xing@intel.com> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> --- arch/x86/entry/vdso/vsgx_enter_enclave.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)