[PATCH for_v22 v2 1/8] selftests/x86/sgx: Align enclave binary on 4k boundary

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

 



Align the enclave's binary blob to 4096 bytes so that a pointer to the
blob satisfies hardware's requirements that the source data for EADD be
page aligned.  An upcoming kernel change will extend the alignment
requirement to userspace so that the kernel can avoid copying the source
into an internal buffer, i.e. pass the userspace pointer directly to
EADD.

Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
---
 tools/testing/selftests/x86/sgx/encl_piggy.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/x86/sgx/encl_piggy.S b/tools/testing/selftests/x86/sgx/encl_piggy.S
index 542001658afb..a7f6447abbba 100644
--- a/tools/testing/selftests/x86/sgx/encl_piggy.S
+++ b/tools/testing/selftests/x86/sgx/encl_piggy.S
@@ -4,6 +4,7 @@
  */
 
 	.section ".rodata", "a"
+	.balign 4096
 
 encl_bin:
 	.globl encl_bin
-- 
2.22.0




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

  Powered by Linux