We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61fb9d1 commit 707e21eCopy full SHA for 707e21e
intel-sgx/enclave-runner/src/loader.rs
@@ -196,16 +196,9 @@ impl<'a> EnclaveBuilder<'a> {
196
return 0;
197
}
198
199
- let (base, size) = {
200
- let cpuid = cpuid(0x0d, bit);
201
- let base = cpuid.map_or(0, |c| c.ebx);
202
-
203
- if base == 0 {
204
- (0, 0)
205
- } else {
206
- let size = cpuid.map_or(0, |c| c.eax);
207
- (base, size)
208
- }
+ let CpuidResult { ebx: base, eax: size, .. } = match cpuid(0x0d, bit) {
+ None | Some(CpuidResult { ebx: 0, .. }) => return 0,
+ Some(v) => v,
209
};
210
211
if max_ssaframesize_in_pages * 0x1000 < base + size {
0 commit comments