On 3/16/22 02:46, Jethro Beekman wrote: >> +void update_cpusvn_intel(void) +{ + sgx_lock_epc(); + if >> (sgx_zap_pages()) > Doing this automatically and unconditionally during a microcode > update seems undesirable. This requires the userland tooling that is > coordinating the microcode update to be aware of any SGX enclaves > that are running and possibly coordinate sequencing with the > processes containing those enclaves. This coupling does not exist > today. "Today" in what? If a microcode update changes SGX behavior and bumps CPUSVN, it's fundamentally incompatible with letting enclaves continue to run. They might as well be killed. But, seriously, if you can't handle enclaves being killed every few months, don't use SGX. The architecture doesn't allow data to be persistent like normal x86. It's fundamental to the architecture. You can also think of this as a shiny new SGX *testing* feature: one that keeps enclave owners from becoming complacent and forgetting about what the SGX architecture provides.