selftests/sgx: Remove redundant enclave base address save/restore
authorJo Van Bulck <jo.vanbulck@cs.kuleuven.be>
Thu, 5 Oct 2023 15:38:47 +0000 (17:38 +0200)
committerDave Hansen <dave.hansen@linux.intel.com>
Fri, 8 Dec 2023 18:05:27 +0000 (10:05 -0800)
Remove redundant push/pop pair that stores and restores the enclave base
address in the test enclave, as it is never used after the pop and can
anyway be easily retrieved via the __encl_base symbol.

Signed-off-by: Jo Van Bulck <jo.vanbulck@cs.kuleuven.be>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Acked-by: Kai Huang <kai.huang@intel.com>
Link: https://lore.kernel.org/all/20231005153854.25566-7-jo.vanbulck%40cs.kuleuven.be
tools/testing/selftests/sgx/test_encl_bootstrap.S

index 03ae0f57e29d0ef1f6ad7f963d78f4a09e0fbeac..e0ce993d3f2cb5004b308e76844bbee36b361e6f 100644 (file)
@@ -55,12 +55,9 @@ encl_entry_core:
        push    %rax
 
        push    %rcx # push the address after EENTER
-       push    %rbx # push the enclave base address
 
        call    encl_body
 
-       pop     %rbx # pop the enclave base address
-
        /* Clear volatile GPRs, except RAX (EEXIT function). */
        xor     %rcx, %rcx
        xor     %rdx, %rdx