Commit bf92b821 authored by Jo Van Bulck's avatar Jo Van Bulck Committed by Greg Kroah-Hartman
Browse files

selftests/sgx: Include memory clobber for inline asm in test enclave



[ Upstream commit 853a57a4 ]

Add the "memory" clobber to the EMODPE and EACCEPT asm blocks to tell the
compiler the assembly code accesses to the secinfo struct. This ensures
the compiler treats the asm block as a memory barrier and the write to
secinfo will be visible to ENCLU.

Fixes: 20404a80 ("selftests/sgx: Add test for EPCM permission changes")
Signed-off-by: default avatarJo Van Bulck <jo.vanbulck@cs.kuleuven.be>
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: default avatarKai Huang <kai.huang@intel.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Link: https://lore.kernel.org/all/20231005153854.25566-4-jo.vanbulck%40cs.kuleuven.be


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2cfae256
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment