Skip to content

Commit 7fa2b13

Browse files
authored
Remove now-unused code specific to a deprecated platform (#6781)
1 parent 8b7c8f3 commit 7fa2b13

File tree

6 files changed

+1
-102
lines changed

6 files changed

+1
-102
lines changed

include/ccf/pal/attestation.h

+1-6
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313

1414
#include <fcntl.h>
1515
#include <functional>
16-
17-
#if !defined(INSIDE_ENCLAVE) || defined(VIRTUAL_ENCLAVE)
18-
# include <sys/ioctl.h>
19-
#else
20-
# include "ccf/pal/attestation_sgx.h"
21-
#endif
16+
#include <sys/ioctl.h>
2217

2318
namespace ccf::pal
2419
{

include/ccf/pal/attestation_sgx.h

-77
This file was deleted.

include/ccf/pal/locking.h

-9
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,4 @@ namespace ccf::pal
1515
* Virtual enclaves and the host code share the same PAL.
1616
*/
1717
using Mutex = std::mutex;
18-
19-
#if !defined(INSIDE_ENCLAVE) || defined(VIRTUAL_ENCLAVE)
20-
static inline void speculation_barrier() {}
21-
#else
22-
static inline void speculation_barrier()
23-
{
24-
oe_lfence();
25-
}
26-
#endif
2718
}

src/enclave/main.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ extern "C"
164164

165165
ccf::enclavetime::host_time_us =
166166
static_cast<decltype(ccf::enclavetime::host_time_us)>(time_location);
167-
168-
ccf::pal::speculation_barrier();
169167
}
170168

171169
if (!ccf::pal::is_outside_enclave(ccf_config, ccf_config_size))
@@ -181,8 +179,6 @@ extern "C"
181179
return CreateNodeStatus::MemoryNotOutsideEnclave;
182180
}
183181

184-
ccf::pal::speculation_barrier();
185-
186182
ccf::StartupConfig cc =
187183
nlohmann::json::parse(ccf_config, ccf_config + ccf_config_size);
188184

src/js/core/context.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
#include <cstdarg>
1717
#include <quickjs/quickjs.h>
1818

19-
#if defined(INSIDE_ENCLAVE) && !defined(VIRTUAL_ENCLAVE)
20-
# include <openenclave/3rdparty/libc/sys/time.h> // For timeval
21-
#endif
22-
2319
namespace ccf::js::core
2420
{
2521
namespace

src/node/snapshotter.h

-2
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,6 @@ namespace ccf
317317
return false;
318318
}
319319

320-
ccf::pal::speculation_barrier();
321-
322320
std::copy(
323321
pending_snapshot.serialised_snapshot.begin(),
324322
pending_snapshot.serialised_snapshot.end(),

0 commit comments

Comments
 (0)